Flex 4.5 树组件

发布于 2024-11-17 13:16:36 字数 73 浏览 8 评论 0原文

  • 如何添加树标题和树标题之间的垂直距离第一个节点?
  • 选择节点时如何设置节点标签的背景颜色。
  • How to add vertical distance between tree header & 1st node of that?
  • How to set the background color of node' label when that node is selected.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

黑白记忆 2024-11-24 13:16:36

我不相信有一种简单的方法可以添加树头和第一个节点之间的垂直距离。可以通过使客户 TreeItemRenderer 只是在顶部添加一个间隙。

要在选择节点时更改节点的背景颜色,您可以使用

myTree.setStyle( "selectionColor", 0x0000FF );

或在 mxml 中声明为控件的属性

<mx:Tree selectionColor="0x0000FF" />

I don't believe there is an easy way to add vertical distance between tree header and first node. It would be possible through making a customer TreeItemRenderer and just adding a gap at the top.

To change the background color of a node when it is selected you can use

myTree.setStyle( "selectionColor", 0x0000FF );

or declared in the mxml as a property of the control

<mx:Tree selectionColor="0x0000FF" />
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文