Jump to content

guictrlcreatemenuitem and guictrlsettip?


Recommended Posts

the helpfile leads me to believe that you can do a guictrlsettip for "guictrlcreate..." functions. (the "guictrlcreate" is a link that shows all the ones it'd work with?)

well, ive tried it with guictrlcreatemenuitem.... no dice. any of you more about this? maybe theres another way someone knows about... ??

here's the help exerpt:

GUICtrlSetTip ( controlID, tiptext [, "title" [, icon [, options]]]]] )

Parameters

controlID The control identifier (controlID) as returned by a GUICtrlCreate... function.

tiptext Tip text that will be displayed when the mouse is hovered over the control.

Edited by gcue
Link to comment
Share on other sites

the helpfile leads me to believe that you can do a guictrlsettip for "guictrlcreate..." functions. (the "guictrlcreate" is a link that shows all the ones it'd work with?)

well, ive tried it with guictrlcreatemenuitem.... no dice. any of you more about this? maybe theres another way someone knows about... ??

Nope, no tip...
#include <GUIConstantsEx.au3>

Opt('MustDeclareVars', 1)

Example()

Func Example()
    Local $msg
    
    GUICreate("My GUI control tip") ; will create a dialog box that when displayed is centered

    Local $ctrlMenuFile = GUICtrlCreateMenu("&File")
    Local $ctrlMenuOpen = GUICtrlCreateMenuItem("&Open", $ctrlMenuFile)
    GUICtrlSetTip($ctrlMenuFile, "This is my menu, " & @LF & _
            "There are many like it, " & @LF & _
            "But this one is mine!")
    
    GUICtrlCreateLabel("my label", 10, 20)
    GUICtrlSetTip(-1, "tip of my label")
    
    GUISetState()

   ; Run the GUI until the dialog is closed
    While 1
        $msg = GUIGetMsg()
        
        If $msg = $GUI_EVENT_CLOSE Then ExitLoop
    WEnd
EndFunc  ;==>Example

That may be a limitation of the standard Windows API, since I can't find any apps here that do have tips on menu items. Do you know of a common app that does?

:)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

i dont.. just thought autoit might after reading that help file..

a bit misleading =/

had my hopes up too =(

Nope, no tip...

#include <GUIConstantsEx.au3>

Opt('MustDeclareVars', 1)

Example()

Func Example()
    Local $msg
    
    GUICreate("My GUI control tip"); will create a dialog box that when displayed is centered

    Local $ctrlMenuFile = GUICtrlCreateMenu("&File")
    Local $ctrlMenuOpen = GUICtrlCreateMenuItem("&Open", $ctrlMenuFile)
    GUICtrlSetTip($ctrlMenuFile, "This is my menu, " & @LF & _
            "There are many like it, " & @LF & _
            "But this one is mine!")
    
    GUICtrlCreateLabel("my label", 10, 20)
    GUICtrlSetTip(-1, "tip of my label")
    
    GUISetState()

  ; Run the GUI until the dialog is closed
    While 1
        $msg = GUIGetMsg()
        
        If $msg = $GUI_EVENT_CLOSE Then ExitLoop
    WEnd
EndFunc ;==>Example

That may be a limitation of the standard Windows API, since I can't find any apps here that do have tips on menu items. Do you know of a common app that does?

:)

Link to comment
Share on other sites

i dont.. just thought autoit might after reading that help file..

a bit misleading =/

had my hopes up too =(

You can detect which menu item is selected, that is highlighted before it is clicked, using the message $WM_MENUSELECT.

If you search for WM_MENUSELECT you might find something.

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...