Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Bug: WEXIST see's tool tips as a window
Message
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Miscellaneous
Thread ID:
00976135
Message ID:
00976171
Views:
18
Could "Tooltip" be redefined in 9 as a user defined window?:)

I don't have 9 (any more) - but 8 did not report it as a window!

Good eye!

>Here is an interesting one (well, it's interesting to me anyway !)
>It seems VFP 9 sees ToolTipText as a window. Well, the WEXIST function does anyway.
>
>Myself and my boss found unusual tool bar behaviour when we recompiled one of our projects in VFP9. We use the WEXIST function to see if a tool bar has been closed or not, and the tool tip text on the button which creates the tool bar is the same as the tool bar caption. We were finding that sometimes the system thought the tool bar was still open, even though it wasn't. In VFP8, everything was fine.
>
>What seems to happen is when the tool tip is created, you can use the WEXIST function on the tool tip text and it will return .T.
>
>For anyone interested, here is some example code. Place it in a .PRG and run it.
>It will create a button and a text box on the screen. Hover the mouse over the button, and the timer will kick in, and the WEXIST function will see the tool tip text as a window.
>Click the button to stop.
>
>Thanks
>Michael.
>
>
>*********************************************
>CLEAR
>
>DO _cleanup
>
>WITH _screen
>	.ShowTips = .T.
>	.AddObject( "oCommand","cCommandButton" )
>	.oCommand.Caption = "Test"
>	.oCommand.ToolTipText = "ToolTip Test"
>	.oCommand.Left = 10
>	.oCommand.Top = 10
>	.oCommand.Height = 17
>	.oCommand.Visible = .T.
>
>	.AddObject( "oText","TextBox" )
>	.oText.Left = 10
>	.oText.Top = 50
>	.oText.Visible = .T.
>
>	.AddObject( "oTimer","cTimer" )
>ENDWITH
>
>DEFINE CLASS cTimer AS Timer
>	PROCEDURE Timer
>	* WEXIST is seeing the actual ToolTipText as a Window !!!!
>	IF WEXIST( "ToolTip Test" ) && ToolTipText
>		_screen.oText.Value = "ToolTip Visible"
>	ELSE
>		_screen.oText.Value = "Not Visible"
>	ENDIF
>	ENDPROC
>	Interval = 300
>ENDDEFINE
>
>DEFINE CLASS cCommandButton AS CommandButton
>PROCEDURE Click
>	DO _cleanup
>ENDDEFINE
>
>PROCEDURE _cleanup
>	IF VARTYPE( _screen.oCommand ) = "O"
>	_screen.RemoveObject('oCommand')
>	ENDIF
>	IF VARTYPE( _screen.oText ) = "O"
>	_screen.RemoveObject('oText')
>	ENDIF
>	IF VARTYPE( _screen.oTimer ) = "O"
>	_screen.RemoveObject('oTimer')
>	ENDIF
>ENDPROC
>
>**************************************************
>
Imagination is more important than knowledge
Previous
Reply
Map
View

Click here to load this message in the networking platform