Desktop Help library

agraham

Expert
Licensed User
Longtime User
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.
 

Attachments

  • HelpDesktop1.0.zip
    17.1 KB · Views: 252

francisco cobos

Member
Licensed User
Longtime User
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:
 

francisco cobos

Member
Licensed User
Longtime User
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
 

agraham

Expert
Licensed User
Longtime User
is there any possibility to pass the text of the tooltip to a string?
Do you mean like this
B4X:
String  = GetToolTip(control) ' Returns the tool tip text for control name.
I don't understand about the click, the tool tip pops up without clicking :confused:
 
Last edited:

francisco cobos

Member
Licensed User
Longtime User
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

:sign0137:
 

agraham

Expert
Licensed User
Longtime User
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
 

francisco cobos

Member
Licensed User
Longtime User
Thank you, now it works perfectly, I have just changed this:

stringX=toolTtip.GetToolTip (ToolTip.HelpID))

whith:

stringX=ToolTip.HelpID
:)
 

klaus

Expert
Licensed User
Longtime User
Hi Andrew,

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.

Thank's in advance.
 

agraham

Expert
Licensed User
Longtime User
Do you have to pay to use these? :)
TollbarButtons

I would expect this to work but haven't actually tried it.
B4X:
ToolTip.SetToolTip(ToolStripButton.ControlRef, "tip")
ToolTip.SetToolTip(ToolBarButton.Value, "tip")
Note the difference in property names used to return the control reference. This varies between implementors
 

klaus

Expert
Licensed User
Longtime User
Hi Andrew,

B4X:
TollbarButtons 
Do you have to pay to use these?

Perhaps I should, or at least pay you for your help.

I had alraedy tried your suggestion, but I get the error below.

I have attached my small test program, without the libraies.

Best regards.
 

Attachments

  • TestControlEx.sbp
    2.8 KB · Views: 27

agraham

Expert
Licensed User
Longtime User
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.
 

agraham

Expert
Licensed User
Longtime User
I tried your program, but get the error below:
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 ?
You do have three in your code. tspSelect is probably the one you have overlooked.
 

Zenerdiode

Active Member
Licensed User
Hello Andrew,

I have a couple of questions regarding this help library:

  1. 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.
  2. 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.

Many Thanks.
 

agraham

Expert
Licensed User
Longtime User
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?
B4X:
   Obj1.New1
   Button1.FontColor = cGray   
   Obj1.FromControl("Button1")
   Obj1.SetProperty2("FlatStyle", "Flat")
 

Zenerdiode

Active Member
Licensed User
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.

:sign0188:
 
Top