Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Nebula » Checkbox in Grid column header
Checkbox in Grid column header [message #518245] Wed, 03 March 2010 15:20 Go to next message
Frederic Delhoume is currently offline Frederic DelhoumeFriend
Messages: 8
Registered: July 2009
Junior Member
Hi,

I would like to display a checkbox in a column header.
SWT.CHECK for the GridColumn creates checkboxes in items, but not in header.

This idea is to use this to check/uncheck all items in column.

Thanks,

Frederic.

[Updated on: Wed, 03 March 2010 15:28]

Report message to a moderator

Re: Checkbox in Grid column header [message #518534 is a reply to message #518245] Thu, 04 March 2010 07:18 Go to previous messageGo to next message
Enrico Schnepel is currently offline Enrico SchnepelFriend
Messages: 121
Registered: July 2009
Senior Member
You can set the headerControl in the GridColumn to a SWT Check Button

Enrico

"Frederic Delhoume" <delhoume@fr.ibm.com> schrieb im Newsbeitrag
news:hmlun8$qm$1@build.eclipse.org...
> Hi,
>
> I would like to display a checkbox in a row header.
> SWT.CHECK for the GridColumn creates checkboxes in items, but not in
> header.
>
> This idea is to use this to check/uncheck all items in column.
>
> Thanks,
>
> Frederic.
>
Re: Checkbox in Grid column header [message #518647 is a reply to message #518534] Thu, 04 March 2010 16:57 Go to previous messageGo to next message
Frederic Delhoume is currently offline Frederic DelhoumeFriend
Messages: 8
Registered: July 2009
Junior Member
Hi,

I do not know how to set a checkbox in Column header (not row). Do you have code to share ?

What I did was create a subclass of DefaultColumnHeaderRenderer that contains a custom CheckboxRenderer and that has a custom draw method.

Trick setMouseDown to toggle checkbox and behavior is there.

Lot of work, some graphical glitches, but finaly it works enough for me.

Fred.
Re: Checkbox in Grid column header [message #524999 is a reply to message #518647] Mon, 05 April 2010 08:59 Go to previous message
Santhosh Hari is currently offline Santhosh HariFriend
Messages: 21
Registered: March 2010
Junior Member
How is it possibe to get the checked items /elements in a particular GridViewer column?

Are you able to get that? If yes,kindly post your valuable suggestions for me.I ' m facing a similar problem
Previous Topic:Adding checkbox button to specific columns in GridTreeViewer
Next Topic:Checkbox in Grid column header
Goto Forum:
  


Current Time: Fri Dec 19 08:01:41 GMT 2014

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

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