LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

problem with "SetCtrlToolTipAttribute" when scrolling

Hi,

I am working with LabWindows/CVI 6.0 on Windows XP. I load "toolbox.fp" into my project and use the function "SetCtrlToolTipAttribute" to display a tool tip on a command button.
This usually works, but the problem is: The command button lies on a panel with a vertical scroll bar. When I scroll up- or downwards, the tool tip doesn't appear at the new position of the command button, but instead at the position that the button originally was shown. (I hope I am making myself clear 🙂 ).
Is there a way to assure that the tool tip is always shown at the current position of a control?

Thanks in advance
junimond

0 Kudos
Message 1 of 2
(2,856 Views)

Junimond,

the toolbox instrument is distributed with source code, so you can dig into it to understand how it's working. A quick look at it make me feel that the behaviour you are seeing depends on the tooltip instrument using GetCtrlBoundingRect to set tooltip position (inside CtrlToolTip_CheckTip function): this function relates coordinates to the top left corner of the panel BEFORE IT IS SCROLLED, as the online help clarifies, so the tooltip being shown in the position the control has before scrolling is the expected behaviour.

I'm afraid to correct this you should modify the toolbox source code to update the position of the control when the tooltip is shown (you could integrate a call to SetPanelAttribute (panel, ATTR_VSCROLL_OFFSET, ...) and use this value to trim the tooltip panel vertical position; the same with HSCROLL_OFFSET in case you can also scroll horizontally your panel)

After modifying the source code recompile the file and create the object so that the modification reflects in your project. Keep in mind that every modification you make to the toolbox instrument will need to be redone (and retest!) when you move to another version of CVI.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 2 of 2
(2,850 Views)