Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Buttons in TreeEditor twinkle on item expand/collapse
Buttons in TreeEditor twinkle on item expand/collapse [message #646880] Sat, 01 January 2011 21:27 Go to next message
No real name is currently offline No real name
Messages: 8
Registered: January 2011
Junior Member
Hi,

I managed to build a tree with check box on some items but not all (and many columns).
I use virtual tree, tree editor for SWT.CHECK buttons, and EraseItem listener on the tree, to make my buttons background follows the tree items background on selection...

it works fine, but there still a little artefact I can't figure to avoid. When I collapse or expand an item in my tree, the button in the item and in items above twinkle, they are erased then redrawn. Any idea on how I can avoid this ?
I think I could find a way to intercept buttons erasing, then I'll be able to select which one to erase or not, but I am not familiar with swt.

[Updated on: Sat, 01 January 2011 21:30]

Report message to a moderator

Re: Buttons in TreeEditor twinkle on item expand/collapse [message #647518 is a reply to message #646880] Thu, 06 January 2011 13:28 Go to previous messageGo to next message
No real name is currently offline No real name
Messages: 8
Registered: January 2011
Junior Member
No idea ? It is the lastest big artefact I have. If I have a solution I may post a snippet for creating this kind of tree, as I saw it is a features often asked.
But I suppose it is not easy to fix else this snippet would already be available ^^
Re: Buttons in TreeEditor twinkle on item expand/collapse [message #647639 is a reply to message #647518] Fri, 07 January 2011 09:33 Go to previous messageGo to next message
Lakshmi Shanmugam
Messages: 274
Registered: July 2009
Location: India
Senior Member
Hi,

I could reproduce this behavior. The problem is that all the editors listen to the Tree Expand and Collapse events and are redrawn on every item expand/collapse.
I have opened a bug for this under SWT --> https://bugs.eclipse.org/bugs/show_bug.cgi?id=333748


Lakshmi P Shanmugam
Re: Buttons in TreeEditor twinkle on item expand/collapse [message #647680 is a reply to message #646880] Fri, 07 January 2011 13:06 Go to previous message
No real name is currently offline No real name
Messages: 8
Registered: January 2011
Junior Member
I didn't thought it was a bug, so thanks you.
I tried on winXP and OSX and both are affected.

Do you know if I can simply remove these listener on editors ? Then I'll be able to manage them my self.
Hmmm... seems that we can't manage listener of these object...

[Updated on: Fri, 07 January 2011 13:12]

Report message to a moderator

Previous Topic:A custom copy/paste operation
Next Topic:What should stay and what should go for packaging a lighter SWT JAR.
Goto Forum:
  


Current Time: Wed Aug 27 23:16:57 EDT 2014

Powered by FUDForum. Page generated in 0.13495 seconds