|
|
|
|
Re: Question regarding TreeViewer [message #462711 is a reply to message #462704] |
Mon, 17 October 2005 20:50 |
Andre Pareis Messages: 113 Registered: July 2009 |
Senior Member |
|
|
Grant Gayed schrieb:
> The approach that you're taking is correct. You can make the background
> colour span the full width, excluding the expand/collapse box, by creating
> your Tree with style SWT.FULL_SELECTION.
>
> Ideally, style FULL_SELECTION should not be needed to make this work, but
> this seems to be the case on win32. I'm not sure if this is a bug or native
> platform behaviour, so I've logged
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=112791 to investigate.
>
> Grant
Great - or not so great, but I can live with that small bug for the time
being. I added FULL_SELECTION, now the row is colored completely.
I still have no idea how to do the banding with alternating colors on a
tree correctly. The problem is that I just can't go through the
hierarchy and apply alternating background colors to the TreeItems on my
way, because I have to consider the expansion state of each node so that
no two rows will result in the same background color.
I'm sure this is FAQ, but I have no idea where to hook for listening to
expansion events - if there are such ???
Can somebody point me into the right direction?
andre
|
|
|
Re: Question regarding TreeViewer [message #462731 is a reply to message #462711] |
Tue, 18 October 2005 13:57 |
Grant Gayed Messages: 2150 Registered: July 2009 |
Senior Member |
|
|
Tree.addTreeListener() will let you listen for expands and collapses.
"Andre R. Pareis" <andre.pareis@entura.ch> wrote in message
news:dj12rd$n6e$1@news.eclipse.org...
> Grant Gayed schrieb:
> > The approach that you're taking is correct. You can make the background
> > colour span the full width, excluding the expand/collapse box, by
creating
> > your Tree with style SWT.FULL_SELECTION.
> >
> > Ideally, style FULL_SELECTION should not be needed to make this work,
but
> > this seems to be the case on win32. I'm not sure if this is a bug or
native
> > platform behaviour, so I've logged
> > https://bugs.eclipse.org/bugs/show_bug.cgi?id=112791 to investigate.
> >
> > Grant
>
> Great - or not so great, but I can live with that small bug for the time
> being. I added FULL_SELECTION, now the row is colored completely.
>
> I still have no idea how to do the banding with alternating colors on a
> tree correctly. The problem is that I just can't go through the
> hierarchy and apply alternating background colors to the TreeItems on my
> way, because I have to consider the expansion state of each node so that
> no two rows will result in the same background color.
>
> I'm sure this is FAQ, but I have no idea where to hook for listening to
> expansion events - if there are such ???
>
> Can somebody point me into the right direction?
>
> andre
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02460 seconds