问题描述
我正在使用Java,SmartGWT 2.5& Mozilla FF 3.6.x.我使用Tree,TreeGrid& TreeNode在我的应用程序。我的问题是:我想对树节点的3个不同状态的树节点应用不同的样式。状态是:已启用,已选择,已覆盖(鼠标悬停)。
覆盖getBaseStyle()或getCellCSSText()。这里有一个例子:
API适用于TreeGrid,因为ListGrid是它的超类。这些方法的记录参数是您的TreeNode。
I'm working on Java, SmartGWT 2.5 & Mozilla FF 3.6.x. I'm using Tree, TreeGrid & TreeNode in my application. My question is: I want to apply different styles to a TreeNode for 3 different States of the TreeNode. The States are: Enabled, Selected, Over(Mouse over). How can I achieve this?
Thanks in advance.
Override getBaseStyle() or getCellCSSText(). There's an example of each here:
http://www.smartclient.com/smartgwt/showcase/#grid_appearance_hilite_add
http://www.smartclient.com/smartgwt/showcase/#grid_appearance_hilite_replace
This same API applies to TreeGrid because ListGrid is it's superclass. The "Record" parameter to these methods are your TreeNode.
这篇关于如何应用不同的样式到不同的州的TreeNode?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!