Desktop Help library

Discussion in 'Additional Libraries' started by agraham, Jul 14, 2008.

  1. agraham

    agraham Expert Licensed 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.
     

    Attached Files:

  2. francisco cobos

    francisco cobos Member Licensed 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:
     
  3. francisco cobos

    francisco cobos Member Licensed 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
     
  4. agraham

    agraham Expert Licensed User

    Do you mean like this
    Code:
    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: Jul 16, 2008
  5. francisco cobos

    francisco cobos Member Licensed 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:
     
  6. agraham

    agraham Expert Licensed User

    You need to set a HelpID for each control using the control name and retrieve it in the event.
    Code:
    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
     
  7. francisco cobos

    francisco cobos Member Licensed User

    Thank you, now it works perfectly, I have just changed this:

    stringX=toolTtip.GetToolTip (ToolTip.HelpID))

    whith:

    stringX=ToolTip.HelpID
    :)
     
  8. klaus

    klaus Expert Licensed 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.
     
  9. agraham

    agraham Expert Licensed User

    Do you have to pay to use these? :)
    I would expect this to work but haven't actually tried it.
    Code:
    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
     
  10. klaus

    klaus Expert Licensed User

    Hi Andrew,

    Code:
    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.
     

    Attached Files:

  11. agraham

    agraham Expert Licensed 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.
     
  12. klaus

    klaus Expert Licensed User

    Sorry I wanted to limit the number of files.
    But limited too much.
    Here they are.

    Best regards.
     

    Attached Files:

    Last edited: Dec 8, 2008
  13. agraham

    agraham Expert Licensed User

    Here you are. ToolTips everywhere courtesy of the Door library :)
     

    Attached Files:

  14. klaus

    klaus Expert Licensed User

    I tried your program, but get the error below:

    There is another strange thing, only 2 ToolstripComboboxes are declared but 3 are displayed ?
     
    Last edited: Oct 29, 2008
  15. agraham

    agraham Expert Licensed User

    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

    You do have three in your code. tspSelect is probably the one you have overlooked.
     
  16. klaus

    klaus Expert Licensed User

    After having updated the Door library in the program folder it works fine.
    And I missed tspSelect.

    Sorry for not having checked every thing.

    Best regards and thank you for your help.
     
  17. Zenerdiode

    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.
     
  18. agraham

    agraham Expert Licensed 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?
    Code:
    Obj1.New1
       Button1.FontColor = cGray   
       Obj1.FromControl(
    "Button1")
       Obj1.SetProperty2(
    "FlatStyle""Flat")
     
  19. Zenerdiode

    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:
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice