Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Nebula » How to provide tooltip text for images in grid view?
How to provide tooltip text for images in grid view? [message #42280] Mon, 29 October 2007 14:29 Go to next message
BG is currently offline BG
Messages: 45
Registered: July 2009
Member
Hello,

I am using GridColumnLabelProvider to put a image in one of the columns of
my grid view. But am not able to put (return) a tooltip text for the
image. I tried with getTooltipText but no use. Is there any API to put the
tooltip for images?

Thanks,
BG
Re: How to provide tooltip text for images in grid view? [message #42415 is a reply to message #42280] Mon, 29 October 2007 17:12 Go to previous messageGo to next message
Chris Gross is currently offline Chris Gross
Messages: 253
Registered: July 2009
Senior Member
Grid does have the ability to show cell specific tooltips but I don't
believe that functionality is in the viewer. You should be able to call
GridItem.setToolTipText(index,String) in your GCLP.update(ViewerCell)
method.

Regards,
-Chris

BG wrote:
> Hello,
>
> I am using GridColumnLabelProvider to put a image in one of the columns
> of my grid view. But am not able to put (return) a tooltip text for the
> image. I tried with getTooltipText but no use. Is there any API to put
> the tooltip for images?
> Thanks,
> BG
>
Re: How to provide tooltip text for images in grid view? [message #42471 is a reply to message #42415] Mon, 29 October 2007 17:31 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas Schindl
Messages: 5419
Registered: July 2009
Senior Member
Hi,

are there no hover-events generated by the Grid when one moves the
mouse. The ToolTip support build into ever viewer inheriting from JFace
listens to those events and opens a SWT-Shell to present the ToolTip
which could be very fancy.

If this is not working for Grid like it does for SWT I think we need a
bug with a snippet and track the problem down.

Tom

Chris Gross schrieb:
> Grid does have the ability to show cell specific tooltips but I don't
> believe that functionality is in the viewer. You should be able to call
> GridItem.setToolTipText(index,String) in your GCLP.update(ViewerCell)
> method.
>
> Regards,
> -Chris
>
> BG wrote:
>> Hello,
>>
>> I am using GridColumnLabelProvider to put a image in one of the
>> columns of my grid view. But am not able to put (return) a tooltip
>> text for the image. I tried with getTooltipText but no use. Is there
>> any API to put the tooltip for images?
>> Thanks,
>> BG
>>


--
B e s t S o l u t i o n . at
------------------------------------------------------------ --------
Tom Schindl JFace-Committer
------------------------------------------------------------ --------
Re: How to provide tooltip text for images in grid view? [message #42486 is a reply to message #42471] Mon, 29 October 2007 18:43 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas Schindl
Messages: 5419
Registered: July 2009
Senior Member
Hi,

for me tooltips simply work as designed (I've tested on OS-X) only
please take a look at the nebula-snippets available in CVS (Snippet5 is
holds the code).

I suppose you simply forgot to add this line to your Viewer-Setup :-)

-----8<-----
ColumnViewerToolTipSupport.enableFor(v,ToolTip.NO_RECREATE);
-----8<-----

which is required to get ToolTips working for ColumnViewer and it's
friends :-)

We should try to port more JFace-Snippets and make a dedicated wiki page
(any volunteers :-) most of the time the only task is to copy the
existing JFace-Snippet and replace the Table/TreeViewer for their grid
counter parts.

Tom

Tom Schindl schrieb:
> Hi,
>
> are there no hover-events generated by the Grid when one moves the
> mouse. The ToolTip support build into ever viewer inheriting from JFace
> listens to those events and opens a SWT-Shell to present the ToolTip
> which could be very fancy.
>
> If this is not working for Grid like it does for SWT I think we need a
> bug with a snippet and track the problem down.
>
> Tom
>
> Chris Gross schrieb:
>> Grid does have the ability to show cell specific tooltips but I don't
>> believe that functionality is in the viewer. You should be able to
>> call GridItem.setToolTipText(index,String) in your
>> GCLP.update(ViewerCell) method.
>>
>> Regards,
>> -Chris
>>
>> BG wrote:
>>> Hello,
>>>
>>> I am using GridColumnLabelProvider to put a image in one of the
>>> columns of my grid view. But am not able to put (return) a tooltip
>>> text for the image. I tried with getTooltipText but no use. Is there
>>> any API to put the tooltip for images?
>>> Thanks,
>>> BG
>>>
>
>


--
B e s t S o l u t i o n . at
------------------------------------------------------------ --------
Tom Schindl JFace-Committer
------------------------------------------------------------ --------
Re: How to provide tooltip text for images in grid view? [message #42616 is a reply to message #42486] Tue, 30 October 2007 17:46 Go to previous message
Chris Gross is currently offline Chris Gross
Messages: 253
Registered: July 2009
Senior Member
You're right Tom. I only meant that the viewer work doesn't use the
built-in cell tooltip support in Grid. That wouldn't be very difficult
to do by modifying GridColumnLabelProvider. Anyway, the existing
support should be more than sufficient.

-Chris

Tom Schindl wrote:
> Hi,
>
> for me tooltips simply work as designed (I've tested on OS-X) only
> please take a look at the nebula-snippets available in CVS (Snippet5 is
> holds the code).
>
> I suppose you simply forgot to add this line to your Viewer-Setup :-)
>
> -----8<-----
> ColumnViewerToolTipSupport.enableFor(v,ToolTip.NO_RECREATE);
> -----8<-----
>
> which is required to get ToolTips working for ColumnViewer and it's
> friends :-)
>
> We should try to port more JFace-Snippets and make a dedicated wiki page
> (any volunteers :-) most of the time the only task is to copy the
> existing JFace-Snippet and replace the Table/TreeViewer for their grid
> counter parts.
>
> Tom
>
> Tom Schindl schrieb:
>> Hi,
>>
>> are there no hover-events generated by the Grid when one moves the
>> mouse. The ToolTip support build into ever viewer inheriting from
>> JFace listens to those events and opens a SWT-Shell to present the
>> ToolTip which could be very fancy.
>>
>> If this is not working for Grid like it does for SWT I think we need a
>> bug with a snippet and track the problem down.
>>
>> Tom
>>
>> Chris Gross schrieb:
>>> Grid does have the ability to show cell specific tooltips but I don't
>>> believe that functionality is in the viewer. You should be able to
>>> call GridItem.setToolTipText(index,String) in your
>>> GCLP.update(ViewerCell) method.
>>>
>>> Regards,
>>> -Chris
>>>
>>> BG wrote:
>>>> Hello,
>>>>
>>>> I am using GridColumnLabelProvider to put a image in one of the
>>>> columns of my grid view. But am not able to put (return) a tooltip
>>>> text for the image. I tried with getTooltipText but no use. Is there
>>>> any API to put the tooltip for images?
>>>> Thanks,
>>>> BG
>>>>
>>
>>
>
>
Re: How to provide tooltip text for images in grid view? [message #585948 is a reply to message #42280] Mon, 29 October 2007 17:12 Go to previous message
Chris Gross is currently offline Chris Gross
Messages: 471
Registered: July 2009
Senior Member
Grid does have the ability to show cell specific tooltips but I don't
believe that functionality is in the viewer. You should be able to call
GridItem.setToolTipText(index,String) in your GCLP.update(ViewerCell)
method.

Regards,
-Chris

BG wrote:
> Hello,
>
> I am using GridColumnLabelProvider to put a image in one of the columns
> of my grid view. But am not able to put (return) a tooltip text for the
> image. I tried with getTooltipText but no use. Is there any API to put
> the tooltip for images?
> Thanks,
> BG
>
Re: How to provide tooltip text for images in grid view? [message #585984 is a reply to message #42415] Mon, 29 October 2007 17:31 Go to previous message
Thomas Schindl is currently offline Thomas Schindl
Messages: 5419
Registered: July 2009
Senior Member
Hi,

are there no hover-events generated by the Grid when one moves the
mouse. The ToolTip support build into ever viewer inheriting from JFace
listens to those events and opens a SWT-Shell to present the ToolTip
which could be very fancy.

If this is not working for Grid like it does for SWT I think we need a
bug with a snippet and track the problem down.

Tom

Chris Gross schrieb:
> Grid does have the ability to show cell specific tooltips but I don't
> believe that functionality is in the viewer. You should be able to call
> GridItem.setToolTipText(index,String) in your GCLP.update(ViewerCell)
> method.
>
> Regards,
> -Chris
>
> BG wrote:
>> Hello,
>>
>> I am using GridColumnLabelProvider to put a image in one of the
>> columns of my grid view. But am not able to put (return) a tooltip
>> text for the image. I tried with getTooltipText but no use. Is there
>> any API to put the tooltip for images?
>> Thanks,
>> BG
>>


--
B e s t S o l u t i o n . at
------------------------------------------------------------ --------
Tom Schindl JFace-Committer
------------------------------------------------------------ --------
Re: How to provide tooltip text for images in grid view? [message #585993 is a reply to message #42471] Mon, 29 October 2007 18:43 Go to previous message
Thomas Schindl is currently offline Thomas Schindl
Messages: 5419
Registered: July 2009
Senior Member
Hi,

for me tooltips simply work as designed (I've tested on OS-X) only
please take a look at the nebula-snippets available in CVS (Snippet5 is
holds the code).

I suppose you simply forgot to add this line to your Viewer-Setup :-)

-----8<-----
ColumnViewerToolTipSupport.enableFor(v,ToolTip.NO_RECREATE);
-----8<-----

which is required to get ToolTips working for ColumnViewer and it's
friends :-)

We should try to port more JFace-Snippets and make a dedicated wiki page
(any volunteers :-) most of the time the only task is to copy the
existing JFace-Snippet and replace the Table/TreeViewer for their grid
counter parts.

Tom

Tom Schindl schrieb:
> Hi,
>
> are there no hover-events generated by the Grid when one moves the
> mouse. The ToolTip support build into ever viewer inheriting from JFace
> listens to those events and opens a SWT-Shell to present the ToolTip
> which could be very fancy.
>
> If this is not working for Grid like it does for SWT I think we need a
> bug with a snippet and track the problem down.
>
> Tom
>
> Chris Gross schrieb:
>> Grid does have the ability to show cell specific tooltips but I don't
>> believe that functionality is in the viewer. You should be able to
>> call GridItem.setToolTipText(index,String) in your
>> GCLP.update(ViewerCell) method.
>>
>> Regards,
>> -Chris
>>
>> BG wrote:
>>> Hello,
>>>
>>> I am using GridColumnLabelProvider to put a image in one of the
>>> columns of my grid view. But am not able to put (return) a tooltip
>>> text for the image. I tried with getTooltipText but no use. Is there
>>> any API to put the tooltip for images?
>>> Thanks,
>>> BG
>>>
>
>


--
B e s t S o l u t i o n . at
------------------------------------------------------------ --------
Tom Schindl JFace-Committer
------------------------------------------------------------ --------
Re: How to provide tooltip text for images in grid view? [message #586061 is a reply to message #42486] Tue, 30 October 2007 17:46 Go to previous message
Chris Gross is currently offline Chris Gross
Messages: 471
Registered: July 2009
Senior Member
You're right Tom. I only meant that the viewer work doesn't use the
built-in cell tooltip support in Grid. That wouldn't be very difficult
to do by modifying GridColumnLabelProvider. Anyway, the existing
support should be more than sufficient.

-Chris

Tom Schindl wrote:
> Hi,
>
> for me tooltips simply work as designed (I've tested on OS-X) only
> please take a look at the nebula-snippets available in CVS (Snippet5 is
> holds the code).
>
> I suppose you simply forgot to add this line to your Viewer-Setup :-)
>
> -----8<-----
> ColumnViewerToolTipSupport.enableFor(v,ToolTip.NO_RECREATE);
> -----8<-----
>
> which is required to get ToolTips working for ColumnViewer and it's
> friends :-)
>
> We should try to port more JFace-Snippets and make a dedicated wiki page
> (any volunteers :-) most of the time the only task is to copy the
> existing JFace-Snippet and replace the Table/TreeViewer for their grid
> counter parts.
>
> Tom
>
> Tom Schindl schrieb:
>> Hi,
>>
>> are there no hover-events generated by the Grid when one moves the
>> mouse. The ToolTip support build into ever viewer inheriting from
>> JFace listens to those events and opens a SWT-Shell to present the
>> ToolTip which could be very fancy.
>>
>> If this is not working for Grid like it does for SWT I think we need a
>> bug with a snippet and track the problem down.
>>
>> Tom
>>
>> Chris Gross schrieb:
>>> Grid does have the ability to show cell specific tooltips but I don't
>>> believe that functionality is in the viewer. You should be able to
>>> call GridItem.setToolTipText(index,String) in your
>>> GCLP.update(ViewerCell) method.
>>>
>>> Regards,
>>> -Chris
>>>
>>> BG wrote:
>>>> Hello,
>>>>
>>>> I am using GridColumnLabelProvider to put a image in one of the
>>>> columns of my grid view. But am not able to put (return) a tooltip
>>>> text for the image. I tried with getTooltipText but no use. Is there
>>>> any API to put the tooltip for images?
>>>> Thanks,
>>>> BG
>>>>
>>
>>
>
>
Previous Topic:Extending Grid & GridViewer
Next Topic:Custom data model for cells in grid
Goto Forum:
  


Current Time: Thu Oct 23 15:21:24 GMT 2014

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

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