To add tooltip for grid items [message #17146] |
Mon, 27 November 2006 11:07  |
Eclipse User |
|
|
|
Originally posted by: krishna.24jan.gmail.com
Hi,
Can any one suggest any possible solution to add tool tip for grid items.
Currently nebula supports tooltip for grid.I want to add tooltip for grid
items which will display its rown and column .
Can any one throw some light in this issue.
Thanks in advance
krishna
|
|
|
|
|
|
Re: To add tooltip for grid items [message #17896 is a reply to message #17869] |
Tue, 28 November 2006 03:35  |
Eclipse User |
|
|
|
Wrong please reread the snippet from Chris:
------------------8<-------------------------
GridItem item = grid.getItem(p); // This is the row
------------------8<-------------------------
Tom
krishna schrieb:
> Dear Chris,
>
> Thanks a lot for the info.I really appreciate the help.
> But in the code u have sent we can get the mouse locations 'p'.
> I want to dislay tooltip for the cells displaying its respective rows
> and columns
> From 'P' i can get columnNo but iam unable to get row no.
>
> Can u help me out in this..
>
> Thanks in advance
> krishna
>
|
|
|
Re: To add tooltip for grid items [message #569253 is a reply to message #17146] |
Mon, 27 November 2006 11:26  |
Eclipse User |
|
|
|
If you want tooltips that are specific to each cell you can do something
like:
grid.addListener(SWT.MouseMove, new Listener()
{
public void handleEvent(Event e)
{
Point p = new Point(e.x,e.y);
GridColumn col = grid.getColumn(p);
GridItem item = grid.getItem(p);
//determine if the col and item have changed from
//previous saved values (i.e. user just moving in new cell?)
grid.setToolTipText("MyToolTipText");
}
});
Regards,
-Chris
krishna wrote:
> Hi,
>
> Can any one suggest any possible solution to add tool tip for grid items.
>
> Currently nebula supports tooltip for grid.I want to add tooltip for
> grid items which will display its rown and column .
>
> Can any one throw some light in this issue.
>
>
> Thanks in advance
> krishna
>
|
|
|
|
Re: To add tooltip for grid items [message #569404 is a reply to message #17255] |
Tue, 28 November 2006 00:02  |
Eclipse User |
|
|
|
Dear Chris,
Thanks a lot for the info.I really appreciate the help.
But in the code u have sent we can get the mouse locations 'p'.
I want to dislay tooltip for the cells displaying its respective rows and
columns
From 'P' i can get columnNo but iam unable to get row no.
Can u help me out in this..
Thanks in advance
krishna
|
|
|
Re: To add tooltip for grid items [message #569468 is a reply to message #17869] |
Tue, 28 November 2006 03:35  |
Eclipse User |
|
|
|
Wrong please reread the snippet from Chris:
------------------8<-------------------------
GridItem item = grid.getItem(p); // This is the row
------------------8<-------------------------
Tom
krishna schrieb:
> Dear Chris,
>
> Thanks a lot for the info.I really appreciate the help.
> But in the code u have sent we can get the mouse locations 'p'.
> I want to dislay tooltip for the cells displaying its respective rows
> and columns
> From 'P' i can get columnNo but iam unable to get row no.
>
> Can u help me out in this..
>
> Thanks in advance
> krishna
>
|
|
|
Powered by
FUDForum. Page generated in 0.04043 seconds