I am running OI 9.1.1 on XP Pro and cannot get "HELPTEXT" to work as a balloon help (Microsoft tooltip). In the Help it says it works for all controls but i do not see this as the case.
With the editline i use, i enter in the clients number and when the code returns saying that the client is in our database, i want to put the clients name in the tooltip for later viewing. But when i put the mouse over it i get nothing. How does this HELPTEXT work??
I should also point out that the editline is on a form that is inside a MDI frame.
Matthew,
The HELPTEXT property can be set and retrieved on all controls. The balloon text is only available on PUSHBMP and PUSHBUTTON controls.
Sean
this is what i am doing and it does not work.
clientname=WHY ME'
retval=set_property(@window:'.CLIENTNO','HELPTEXT',clientname)
Then when I move my mouse over it i get no tooltips.
Matthew,
The tooltip will not display on an editline, only on bitmaps and pushbuttons with bitmaps.
Sean
You said you are using an *editline* though, not a button.
Sean,
Just checked the Help, maybe it needs correcting then.
HELPTEXT property
Applies to
All controls, menu items.
Description
For controls, gets or sets text to be displayed as balloon help. For menu items, gets or sets the help text assigned to the menu item.
So the Helptext is NOT with all controls then?
Hi Matthew,
It would appear not … I have been experimenting and you could try a version of the following, it will require an editline or text field or something similar in which to display your 'tool tip'.
The XPOS and YPOS fields are what I used for testing to show it was working …
I hope this helps,
Simon
Create event of window
$Insert Logical
Common /CursorXY/ CursorXY, CtrlList, SizeList, CurrHelpText
Test = Set_Property(CtrlEntId :'.EDITLINE_1', 'HELPTEXT', 'Testing …')
Test2 = Set_Property(CtrlEntId :'.EDITLINE_1', 'DRAWTEXT', False$)
void = Set_Property(CtrlEntId, 'TIMER', 1 : @fm : 0)
CtrlList = Get_Property(CtrlEntId, 'CTRLMAP') : @fm
Convert @fm to @rm in CtrlList
SizeList = Get_Property(CtrlList, 'SIZE')
Convert @rm to @fm in CtrlList
If CtrlList-1,1=@fm then CtrlList-1,1='
Convert @fm to @vm in SizeList
Convert @rm to @fm in SizeList
CurrHelpText =
Return 1 Timer event of window $Insert Logical Common /CursorXY/ CursorXY, CtrlList, SizeList, CurrHelpText Declare Function Struct_To_Var CursorXY=Str(\00\,8) Call GetCursorPos(CursorXY) CursorXY=Struct_To_Var(CursorXY,"POINT") void = Set_Property(CtrlEntId: '.XPOS', 'TEXT', CursorXY) void = Set_Property(CtrlEntId: '.YPOS', 'TEXT', CursorXY) Parent = CtrlEntId1, '.' ParentSize = Get_Property(Parent, 'SIZE') CursorX = CursorXY CursorY = CursorXY Found = False$ For cLoop=1 to Count(SizeList, @fm) + (SizeList #
)CtrlSize = SizeListxRangeL = ParentSize + CtrlSize + 5xRangeR = ParentSize + CtrlSize + CtrlSizeyRangeT = ParentSize + CtrlSize + 25yRangeB = ParentSize + CtrlSize + CtrlSize + 20HelpText = ''Begin CaseCase CursorX xRangeRCase CursorY yRangeBCase Otherwise$Found = True$HelpText = Get_Property(Parent : '.' : CtrlList, 'HELPTEXT')If Len(HelpText) else HelpText = CtrlListEnd CaseUntil Found
Next
If CurrHelpText # HelpText then
void = Set_Property(Parent : '.HELPTEXT', 'TEXT', HelpText)CurrHelpText=HelpTextEnd
Return 0
The Help has been corrected.
Sean
Mathew,
I remember an article from Sprez that showed how you can do this through Windows API's. A search for "Balloon Help" on Sprezzatura.com seems to bring up this article.
Sean, perhaps this functionality should be added to the list of wanted features for a future version of OI?
HTH,
John
Thanks John - we did indeed document this in http://www.sprezzatura.com/library/senl/senl-v4i3.pdf
World leaders in all things RevSoft
John, thanks for the reference, had forgotten about that.
Can someone paste the code here (no line numbers). Copying from the pdf brings in some strange *codes*.
Have you tried c&p into notepad? This doesn't do fancy so just keeps the text. This is how we use OI help examples…
World leaders in all things RevSoft
Those are simply quote marks. You should be able to just replace them
Is the code as shown proved to be working.
What event should this be placed in.