Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Position of checkbox and tree control in tree table
Position of checkbox and tree control in tree table [message #543665] Wed, 30 June 2010 09:03 Go to next message
Dirk Bernsau is currently offline Dirk Bernsau
Messages: 4
Registered: July 2009
Location: Munich, Germany
Junior Member
Hi,

we'd like to modify the position of the checkbox in out SWT tree table in order to have the checkbox on the left side (no ident) and the tree control (+/-) on the right side of it (maybe even in another column).

The result should look somhow like this:
http://book.javanb.com/swt-the-standard-widget-toolkit/image s/0321256638/graphics/09fig03.gif

We also thought about moving the tree controls to the second column and display checkboxes using custom column icons - but this seems not possible either.

Any hint on solving this issue are highly appreciated.

Thanks and kind regards,
Dirk
Re: Position of checkbox and tree control in tree table [message #544105 is a reply to message #543665] Thu, 01 July 2010 15:21 Go to previous messageGo to next message
Lakshmi Shanmugam
Messages: 274
Registered: July 2009
Location: India
Senior Member
Hi,

Which platform are you trying on?
When you create a Tree with SWT.CHECK box on Mac it appears the same way as shown in the link.



Lakshmi P Shanmugam
Re: Position of checkbox and tree control in tree table [message #544316 is a reply to message #543665] Fri, 02 July 2010 10:27 Go to previous messageGo to next message
Dirk Bernsau is currently offline Dirk Bernsau
Messages: 4
Registered: July 2009
Location: Munich, Germany
Junior Member
We're trying on Windows (W2K). The problem seems to be that the native OS widget decides how to rendern the checkbox, but we'd like to make sure that it looks like we wanted on every platform.
Re: Position of checkbox and tree control in tree table [message #544320 is a reply to message #544316] Fri, 02 July 2010 11:01 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas Schindl
Messages: 5423
Registered: July 2009
Senior Member
This is not supported. The first column has to be the one with +/- and
where the checkbox is displayed is the native platform behavior changing
this would lead to an inconsitent platform L&F.

The only solution is to use a custom drawn control like Nebula-Grid
where the column with the +/- can be at any position you like it to
(beside the fact that you can implement your own renderer to suite your
needs without reordering columns - you naturally loose the native L&F)

Tom

Am 02.07.10 12:27, schrieb Dirk Bernsau:
> We're trying on Windows (W2K). The problem seems to be that the native
> OS widget decides how to rendern the checkbox, but we'd like to make
> sure that it looks like we wanted on every platform.
Re: Position of checkbox and tree control in tree table [message #544322 is a reply to message #544316] Fri, 02 July 2010 11:02 Go to previous messageGo to next message
Daniel Krügler is currently offline Daniel Krügler
Messages: 853
Registered: July 2009
Senior Member
On 02.07.2010 12:27, Dirk Bernsau wrote:
> We're trying on Windows (W2K). The problem seems to be that the native
> OS widget decides how to rendern the checkbox, but we'd like to make
> sure that it looks like we wanted on every platform.

So you should use the snapshot technique as suggested at several places,
e.g.

http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jface.s nippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippet s/viewers/Snippet061FakedNativeCellEditor.java?view=markup

HTH & Greetings from Bremen,

Daniel Krügler
Re: Position of checkbox and tree control in tree table [message #544323 is a reply to message #544322] Fri, 02 July 2010 11:03 Go to previous message
Daniel Krügler is currently offline Daniel Krügler
Messages: 853
Registered: July 2009
Senior Member
On 02.07.2010 13:02, Daniel Krügler wrote:
> On 02.07.2010 12:27, Dirk Bernsau wrote:
>> We're trying on Windows (W2K). The problem seems to be that the native
>> OS widget decides how to rendern the checkbox, but we'd like to make
>> sure that it looks like we wanted on every platform.
>
> So you should use the snapshot technique as suggested at several places,
> e.g.
>
> http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jface.s nippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippet s/viewers/Snippet061FakedNativeCellEditor.java?view=markup

Sorry for the noise, I misunderstood your question.

- Daniel
Previous Topic:virtual table, rcp and libpango
Next Topic:Tooltip for multi-column TreeViewer
Goto Forum:
  


Current Time: Sun Oct 26 05:26:30 GMT 2014

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

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