This library provides access to three Help facilities on the desktop. These are F1 control help, control popup ToolTips and the "What's This?" button for dialogues.
The zip includes library, help, demo and source code for merging.
Thanks Agrahan for your library, now, I can organise better my Hardware application: It's a sort of map with more than 1000 small control button linked to a data base, and I like this new feature to pass the mouse tip over the controls to know its name or other information.
:sign0060:
Just a question: is there any possibility to pass the text of the tooltip to a string? I want to do this without click in the control where I am passing the tip of the mouse.
Thanks in advance
I'm trying to obtain the text inside the tooltip at the run time, so I don't know the name of the control: Something like that:
For ind=0 To table1.RowCount-1
one_function(x,y)
AddButton ("Form1", "But"&ind,x,y, 8,8,nombre_boton)
AddEvent ("But"&ind, Click, "MySub")
ToolTip.SetToolTip("But"&ind,table1.Cell("cod",ind))
Next ind
Sub ToolTip_Popup
stringX=tooltip.GetToolTip ( control??????)
End Sub
You need to set a HelpID for each control using the control name and retrieve it in the event.
B4X:
For ind=0 To table1.RowCount-1
one_function(x,y)
AddButton ("Form1", "But"&ind,x,y, 8,8,nombre_boton)
AddEvent ("But"&ind, Click, "MySub")
ToolTip.SetToolTip("But"&ind,table1.Cell("cod",ind))
Tooltip.SetID("But"&ind,"But"&ind) ' use the control name as an ID
Next ind
Sub ToolTip_Popup
stringX=toolTtip.GetToolTip (ToolTip.HelpID)) ' retrieve the control then its tool tip
End Sub
I have begun 'playing' with the HelpDesktop and The ControlExDesktop libraries.
I am writing a desktop version of my DynSim program and have at the moment TollbarButtons and Imagebuttons. I would like to get TooltipTexts on these buttons and use only one type of buttons, either TollbarButtons or TollStripButtons.
How can I get TooltipTexts on these objects ?
I tried it with the Door library, but am I missing something.
Please can you post the bitmaps so that your app will run. The "problem" is not really a problem as it seems that the ToolTip object only works on Windows Forms Controls (which I knew) and ToolBar and ToolStrip items are not Controls (which I didn't know). I want to run your app to play with possible "solutions" as they do implement a subset of the full ToolTip functionality but don't do it via a ToolTip object.
It works fine for me. I am running version 6.50, presumably you are otherwise the source would not load. Make sure you have the latest version of the Door library in your app directory. It changed to allow for module names in version 6.50
There is another strange thing, only 2 ToolstripComboboxes are declared but 3 are displayed ?
I have a couple of questions regarding this help library:
Is there a way to provide a ToolTip on a control that is disabled? (xxx.Enabled=False) i.e I want to ToolTip a disabled control to inform the user why it is disabled.
Is there a way to fire the balloon without the mouse pointer hovering over the control - e.g. the way Windows informs you the Caps Lock is on when you're about to enter a password.
1) Not easily, even using C# code in a library. The observed behaviour is by design.
2) Theoretically yes, but unfortunately not by reflection as the required method (Show) takes an Interface type as a parameter for the windows handle and you can't easily specify Interfaces as parameter types in the Door library as it uses the actual parameter types to locate the required method.
Can you get away with away with a halfway house like greying the color of the text and/or setting the button style?
Thanks again for your help; but I've found something that is quite elegant and fits my requirements perfectly. There's a guy on here who wrote a 'ControlsExDesktop' library and with it provided an ErrorProvider object. The ErrorProvider works with disabled controls.