LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

ToolTips not working on floating panels

Hello,
 
I have the following problem. I have some small panel with 5 picture buttons on it. To make clear to the user what these pictures mean, I installed ToolTips for these buttons, using the SetCtrlToolTipAttribute function. Now I display this panel, but instead of using DisplayPanel, I use the InstallPopup function, to make sure the use cannot operate the main panel before a selection is made. Problem: The ToolTips are invisible. I guess the Tooltip is implemented as a small panel with a yellow background. Since I use the InstallPopup function to display my selection panel, the Tooltip panel disappears behind the selection panel, making the ToolTip invisible for the user.
Is there some easy solution to this problem? I could of course set the ATTR_DIMMED attribute for the main panel to disable this panel, but I would prefer this panel not to be dimmed...
0 Kudos
Message 1 of 7
(4,353 Views)

In the days before I discovered CVI Tooltips, I used to implement a user interface help scheme by trapping EVENT_RIGHT_CLICK in all my controls/indicators, and drawing a small panel with the appropriate text and appearance, thus simulating tooltips. Given the problem that InstallPopup() generates, a similar approach might be possible. Not ideal, as this new tooltip/help panel would also have to be drawn via InstallPopup() for it to be visible above the main panel, and this in turn would then make it impossible to operate the main panel controls until the help panel has been dismissed.

Even with access to the tooltip source code (at ...\National Intruments\CVI70\toolslib\toolbox\toolbox.c) there does not seem to be an easy solution for this one. If you are ambitious you could modify the relevant toolbox code to draw the CVI tooltip panel using InstallPopup() and see what happens...

JR

Message 2 of 7
(4,331 Views)

Hello JR,

thanks for the response. Because the problem cannot be solved right away, I created a text message on my selection panel. Using extended mouse events this message shows the tooltip text when the mouse is over one of the buttons. Works fine for me Smiley Wink

 

Message 3 of 7
(4,325 Views)

Great solution - the simple ones are always the best! Wonder what the chances are of me remembering this approach when I need it in six months time? Smiley Very Happy

JR

Message 4 of 7
(4,321 Views)

Hi JR,

I would like to mess around in the toolbox code to manipulate the Tool Tips a litte bit Smiley Happy Problem is: when I modify the toolbox.c file, nothing happens. How can I recompile the adjusted toolbox.c file?

0 Kudos
Message 5 of 7
(4,138 Views)

I've never tried, but I would start by adding the local modified copy of the toolbox.c file to your project window and go from there. Probably also need to remove any previous references to the toolbox facilities that the project might already have (eg instrument /.fp files). To avoid confusion, I might also change the filenames to, say, toolbox2.c and toolbox2.h.

Good luck Smiley Happy

0 Kudos
Message 6 of 7
(4,133 Views)
Wim,

The toolbox.fp module uses toolbox.obj as its program file. If you make changes to toolbox.c, you just need to generate a new object file by recompiling it, by selecting Options>>Create Object File.

And of course, jr_2005's solution will also work.

Luis
0 Kudos
Message 7 of 7
(4,117 Views)