Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

why dashed lines disappear in SWT.Tree when Tree's style set to FULL_SELECTION

Tags:

java

tree

swt

See the demo code in java2s's Tree demo code. If I change the Tree's sytle to SWT.FULL_SELECTION, the dashed lines that are connecting the nodes disappear. What should I do to make the dashed lines visible again?

like image 465
hiway Avatar asked Dec 18 '25 14:12

hiway


1 Answers

I think this is a totally OS dependent behavior. Many styles that you set on SWT widgets are actually hint for the OS to define a behavior. Depending on the exact OS the resulting rendering might be different for different styles. Perhaps it would be useful if you read about Windows (XP or 7?) controls and their style parameters if you like to find out more about the reasons here. Have a look here, perhaps this is useful.

TVS_FULLROWSELECT: Version 4.71. Enables full-row selection in the tree view. The entire row of the selected item is highlighted, and clicking anywhere on an item's row causes it to be selected. This style cannot be used in conjunction with the TVS_HASLINES style.
TVS_HASLINES: Uses lines to show the hierarchy of items.

like image 148
Waqas Ilyas Avatar answered Dec 20 '25 02:12

Waqas Ilyas



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!