Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Setting the TooltipText of a TextBox.
Message
 
 
To
10/04/2008 11:12:08
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01309710
Message ID:
01309713
Views:
13
This message has been marked as the solution to the initial question of the thread.
IF "." $ This.ControlSource 
  lcAliasOrObject = JUSTSTEM(This.ControlSource )
  IF USED(lcAliasOrObject)
    * a table/view/cursor
    lcDbc = CURSORGETPROP("Database", lcAliasOrObject)
    IF NOT EMPTY(lcDbc)
      Set Database To (lcDbc)
      ...
    ENDIF 
  ENDIF
ENDIF
>I want to set the TooltipText of my textbox class to the comments property of the field of the ControlSource, but I need to check if the control source is actually a field of a table/view in a database.
>
>This is what i have so far:
>
>
>If Empty(This.ToolTipText) Then
>	If "." $ This.ControlSource Then
>		Set Database To (CursorGetProp("Database",Getwordnum(This.ControlSource, 1, ".")))
>		This.ToolTipText = DBGetProp(This.ControlSource,"Field","Comment")
>	Endif
>Endif
>
>
>There are some checks missing in the above code, I need help with the following:
>
>1. Determine if a controlsource is in fact a field in a table/cursor/view, or an object property or a variable.
>2. If the controlsource is a field in a table/cursor/view, determine if the table/view is contained in a database
>
>Thanks
>
>Carlos Alloatti
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform