Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » TreeItem with no checkbos
TreeItem with no checkbos [message #456705] Tue, 07 June 2005 11:16 Go to next message
Alexandros Karypidis is currently offline Alexandros KarypidisFriend
Messages: 32
Registered: July 2009
Member
I have a tree in which top-level nodes have a checkbox (SWT.CHECK).

Their children also have the checbox, even though I do not specify this in
their constructor. How can I make them NOT have a checkbox?

--
Alexandros Karypidis
UTH, Computer & Communication Eng. dept.
Re: TreeItem with no checkbos [message #456706 is a reply to message #456705] Tue, 07 June 2005 11:37 Go to previous messageGo to next message
Alexandros Karypidis is currently offline Alexandros KarypidisFriend
Messages: 32
Registered: July 2009
Member
To re-state the problem:

I have an Tree which has style SWT.SINGLE.
Some TreeItem top-level entries with style SWT.CHECK
Some TreeItem second-level entries with style SWT.NONE

Now, the second-level entries inherit SWT.CHECK from their parent. I want
them not to do so. How can this be done?

Alexandros Karypidis wrote:

> I have a tree in which top-level nodes have a checkbox (SWT.CHECK).
>
> Their children also have the checbox, even though I do not specify this in
> their constructor. How can I make them NOT have a checkbox?

--
Alexandros Karypidis
UTH, Computer & Communication Eng. dept.
Re: TreeItem with no checkbos [message #456716 is a reply to message #456706] Tue, 07 June 2005 13:41 Go to previous messageGo to next message
Grant Gayed is currently offline Grant GayedFriend
Messages: 2150
Registered: July 2009
Senior Member
Alexandros,

The SWT.CHECK style will apply to all items in a Tree or Table; it's not
supported to specify only a subset of the items to have checkboxes.

As a side note, it's strange that you say you're creating your items with
style CHECK but your Tree with just SINGLE. CHECK is a style that is meant
to be applicable to Trees and Tables, not to their individual items. What
you're doing should result in no checkboxes since TreeItems should just
ignore the CHECK style.

Grant

"Alexandros Karypidis" <akarypid@y-ah-oo.nospa/\m.com> wrote in message
news:d840uc$gvq$1@news.eclipse.org...
> To re-state the problem:
>
> I have an Tree which has style SWT.SINGLE.
> Some TreeItem top-level entries with style SWT.CHECK
> Some TreeItem second-level entries with style SWT.NONE
>
> Now, the second-level entries inherit SWT.CHECK from their parent. I want
> them not to do so. How can this be done?
>
> Alexandros Karypidis wrote:
>
> > I have a tree in which top-level nodes have a checkbox (SWT.CHECK).
> >
> > Their children also have the checbox, even though I do not specify this
in
> > their constructor. How can I make them NOT have a checkbox?
>
> --
> Alexandros Karypidis
> UTH, Computer & Communication Eng. dept.
Re: TreeItem with no checkbos [message #456719 is a reply to message #456716] Tue, 07 June 2005 14:55 Go to previous messageGo to next message
Alexandros Karypidis is currently offline Alexandros KarypidisFriend
Messages: 32
Registered: July 2009
Member
Grant Gayed wrote:

> The SWT.CHECK style will apply to all items in a Tree or Table; it's not
> supported to specify only a subset of the items to have checkboxes.

Ok, I just wanted to make sure I am not missing something...

> As a side note, it's strange that you say you're creating your items with
> style CHECK but your Tree with just SINGLE. CHECK is a style that is
> meant to be applicable to Trees and Tables, not to their individual items.
> What you're doing should result in no checkboxes since TreeItems should
> just ignore the CHECK style.

Indeed. The Tree was actually CHECK|SINGLE. I was experimenting with various
combinations when I wrote this mail and evidently messed up...

Have you got some clue as to whether this can be implemented in Java-only,
without needing support from the SWT native library? I might take this task
upon myself in this case...

Thank you for your reply.

--
Alexandros Karypidis
UTH, Computer & Communication Eng. dept.
Re: TreeItem with no checkbos [message #456985 is a reply to message #456719] Mon, 13 June 2005 20:37 Go to previous messageGo to next message
Steve Northover is currently offline Steve NorthoverFriend
Messages: 1636
Registered: July 2009
Senior Member
> Have you got some clue as to whether this can be implemented in Java-only,
> without needing support from the SWT native library? I might take this
task
> upon myself in this case...
>

The operating system draws the check boxes. You'd need to write your own
tree.
Re: TreeItem with no checkbos [message #457001 is a reply to message #456985] Tue, 14 June 2005 12:21 Go to previous message
Grant Gayed is currently offline Grant GayedFriend
Messages: 2150
Registered: July 2009
Senior Member
If you choose to go down this path then the emulated
Tree/TreeItem/TreeColumn that are included in the motif jar would provide a
good starting point.

Grant

"Steve Northover" <steve_northover@ca.ibm.com> wrote in message
news:d8kqr4$muo$1@news.eclipse.org...
> > Have you got some clue as to whether this can be implemented in
Java-only,
> > without needing support from the SWT native library? I might take this
> task
> > upon myself in this case...
> >
>
> The operating system draws the check boxes. You'd need to write your own
> tree.
>
>
Previous Topic:How to remove a TableColumn?
Next Topic:RetargetAction --- Custom requests --- Copy paste actions
Goto Forum:
  


Current Time: Tue Sep 24 08:33:21 GMT 2024

Powered by FUDForum. Page generated in 0.03230 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top