Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP9 SP2 Tooltips for Grid.Columns and Headers removed!!
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
01260797
Message ID:
01502193
Views:
99
So, will I bind header's MouseEventer/MouseLeave to grid's same methods?

>You can use BINDEVENT() .
>For adding property at run you can use method AddProperty() or function ADDPROPERTY().
>
>and instead INKEY(.1) you must use Sleep(100)
>DECLARE Sleep IN kernel32 integer
>
>MartinaJ
>
>>Hi Martina,
>>
>>Do you have generic code I can use on the grid's level for this? We don't use custom column class and I don't want to introduce one.
>>
>>>>I wanted to share a further improvement on this that I finally discovered. One of the remaining issues was that setting the ToolTipText= "" does not turn off the displayed tooltip immediately as it would normally when you move off of an item. So to get the ToolTip display to go away as soon as the cursor is moved off of the grid column, you can do the following. (Good ole INKEY() to the rescue again). I couldn't find any other way to make this work without using INKEY().
>>>>
>>>>-Mark
>>>
>>>Next version...
>>>
>>>* Add new property ToolTipSource with value "Header1" to class Column
>>>
>>>* Add this to the Column.MouseLeave event
>>>LOCAL lcCur,llST
>>>This.Parent.ToolTipText= ""
>>>lcCur=SET("CURSOR")
>>>SET CURSOR OFF
>>>llST=Thisform.ShowTips
>>>Thisform.ShowTips= .F.  && now turn off currently displayed tip
>>>INKEY(.1)
>>>Thisform.ShowTips= llST
>>>SET CURSOR &lcCur.
>>>
>>>* Add this to the Column.MouseEnter event, (as Andreas provided).
>>>IF EMPTY(This.ToolTipSource)
>>>   This.Parent.ToolTipText= This.ToolTipText
>>>ELSE
>>>   This.Parent.ToolTipText= EVALUATE("This."+This.ToolTipSource+".ToolTipText")
>>>ENDIF
>>>
>>>* Add this to the object/class Header.MouseLeave event
>>>This.Parent.MouseLeave(nButton, nShift, nXCoord, nYCoord)
>>>
>>>* Add this to the object/class Header.MouseEnter event
>>>This.Parent.MouseEnter(nButton, nShift, nXCoord, nYCoord)
>>>
>>>
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform