ToolTip for WBToolBar 
Author Message
 ToolTip for WBToolBar

Hello!

We've been trying to implement tool tips for widgets of the type
WBToolBar (built in WindowBuilder) and we have run across a few
problems. The main problem is that the tool bar (which consists of
several buttons) is viewed as one single unit, so that it is only
possible to specify one single tool tip text for the entire widget in
WindowBuilder. To overcome this we have adopted an approach where we
specify a long text separated by special "separators", so, when the
widget receives the wmMouseMove message, the exact position of the
cursor over the widget is computed and the tool tip text is extracted
from the long text specified in WindowBuilder.

The problem with this approach is that the tool tip mechanisms largely
are implemented in the operating system (Windows NT, in our case), and
that the tool tip text is stored in external memory when the widget is
created. This makes it difficult to change the text to be displayed in
the tool tip box and, with this accomplished, the tool tip windows won't
behave as they should.

So, the question whether anyone has any tips of how we can accomplish
this task.

St?le Heitmann, Computas AS



Sat, 18 Sep 1999 03:00:00 GMT  
 ToolTip for WBToolBar

St?le,

Quote:
> We've been trying to implement tool tips for widgets of the type
> WBToolBar (built in WindowBuilder) and we have run across a few
> problems. The main problem is that the tool bar (which consists of
> several buttons) is viewed as one single unit, so that it is only
> possible to specify one single tool tip text for the entire widget in
> WindowBuilder. To overcome this we have adopted an approach where we
> specify a long text separated by special "separators", so, when the
> widget receives the wmMouseMove message, the exact position of the
> cursor over the widget is computed and the tool tip text is extracted
> from the long text specified in WindowBuilder.

> The problem with this approach is that the tool tip mechanisms largely
> are implemented in the operating system (Windows NT, in our case), and
> that the tool tip text is stored in external memory when the widget is
> created. This makes it difficult to change the text to be displayed in
> the tool tip box and, with this accomplished, the tool tip windows won't
> behave as they should.

> So, the question whether anyone has any tips of how we can accomplish
> this task.

You don't need to do any of the above at all. All you need to do is
update to WBPro 3.1.2 which added support for individual tooltips per
button (they are even used within the WBPro editor as an example).

Just send the "useToolTips: true" message to your WBToolBar. Then, in
your ViewManager, you need to implement a #statusPaneHelp: message to
return the appropriate text for each button selector (there are numerous
examples of that method in the system).

-Eric Clayberg

Smalltalk Systems (StS)         http://www.smalltalksystems.com
An Instantiations Company       http://www.instantiations.com



Sat, 18 Sep 1999 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Tooltip not working for all columns in a MultipleSelectionListView

2. Floating Window As Tooltip

3. Tooltip in several lines

4. BOX control tooltip

5. Column ToolTip CANNOT be disabled, pls hlp

6. Column ToolTip CANNOT be disabled ??

7. Tooltip over Box or Region - is it possible?

8. ToolTip's and Dialog's

9. ToolTip on string?

10. Tooltip font in CW2003?

11. I want rounded corners on tooltip

12. ToolTip Question

 

 
Powered by phpBB® Forum Software