Skip to main content



      Home
Home » Eclipse Projects » Nebula » Nebula GridTableViewer
Nebula GridTableViewer [message #40509] Wed, 26 September 2007 02:22 Go to next message
Eclipse UserFriend
Hello Mr Tom,
I am having a GridTableViewer(Nebula).I am having 5 columns.
I want to get the individual columnheader selection.mean to say if i have
selected 2nd columnheader(not any cell of that column)and i should know
that my 2nd column header is selected.according to that i want to enable
my context menu for hiding and showing of that 2nd column.

is it possible to get the columnheader(means tableheader) selection or to
know that focus is in now at 2nd columnheader?




Thanks in advance
Debasis
Re: Nebula GridTableViewer [message #40725 is a reply to message #40509] Mon, 01 October 2007 17:53 Go to previous messageGo to next message
Eclipse UserFriend
Hi Debasis,

I'm not quite sure if I understand your question. If you are asking if
you can swap the context menu out depending on what is under the mouse
during the right-click I think its possible. You would have to figure
out whats under the x,y coordinates in the SWT.MenuDetect event (by
using methods like getHeaderHeight, GridColumn.getBounds(),etc) and then
replace the menu using setMenu(). I'm not 100% sure it would work but
it seems feasible.

Regards,
-Chris

DebasisMishra wrote:
> Hello Mr Tom,
> I am having a GridTableViewer(Nebula).I am having 5 columns.
> I want to get the individual columnheader selection.mean to say if i
> have selected 2nd columnheader(not any cell of that column)and i should
> know that my 2nd column header is selected.according to that i want to
> enable my context menu for hiding and showing of that 2nd column.
>
> is it possible to get the columnheader(means tableheader) selection or
> to know that focus is in now at 2nd columnheader?
>
>
>
>
> Thanks in advance
> Debasis
>
>
>
Re: Nebula GridTableViewer [message #40749 is a reply to message #40725] Fri, 05 October 2007 10:15 Go to previous message
Eclipse UserFriend
Hi Chris,
Thanks for the reply.I got this by getting the point(x,y coordinates) in
the focus cell.

I am having one question.In my GridTableViewer I have used Editing support
API to get the required widgets in the column.

In one column I am returning the DialogCellEditor.but I have given my
context menu on right click so when i am selecting that cell i am unable
to get my context menu in rightclick.


Thanks
Debasis
Re: Nebula GridTableViewer [message #585117 is a reply to message #40509] Mon, 01 October 2007 17:53 Go to previous message
Eclipse UserFriend
Hi Debasis,

I'm not quite sure if I understand your question. If you are asking if
you can swap the context menu out depending on what is under the mouse
during the right-click I think its possible. You would have to figure
out whats under the x,y coordinates in the SWT.MenuDetect event (by
using methods like getHeaderHeight, GridColumn.getBounds(),etc) and then
replace the menu using setMenu(). I'm not 100% sure it would work but
it seems feasible.

Regards,
-Chris

DebasisMishra wrote:
> Hello Mr Tom,
> I am having a GridTableViewer(Nebula).I am having 5 columns.
> I want to get the individual columnheader selection.mean to say if i
> have selected 2nd columnheader(not any cell of that column)and i should
> know that my 2nd column header is selected.according to that i want to
> enable my context menu for hiding and showing of that 2nd column.
>
> is it possible to get the columnheader(means tableheader) selection or
> to know that focus is in now at 2nd columnheader?
>
>
>
>
> Thanks in advance
> Debasis
>
>
>
Re: Nebula GridTableViewer [message #585129 is a reply to message #40725] Fri, 05 October 2007 10:15 Go to previous message
Eclipse UserFriend
Hi Chris,
Thanks for the reply.I got this by getting the point(x,y coordinates) in
the focus cell.

I am having one question.In my GridTableViewer I have used Editing support
API to get the required widgets in the column.

In one column I am returning the DialogCellEditor.but I have given my
context menu on right click so when i am selecting that cell i am unable
to get my context menu in rightclick.


Thanks
Debasis
Previous Topic:Render a control in the header
Next Topic:CellEditor in the TableViewer is not enabling the context menu
Goto Forum:
  


Current Time: Tue Jul 08 08:35:42 EDT 2025

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

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

Back to the top