Sign in to follow this  
Followers 0
gcue

guictrlcreatemenuitem and guictrlsettip?

4 posts in this topic

#1 ·  Posted (edited)

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

Share this post


Link to post
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

Share this post


Link to post
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?

:)

Share this post


Link to post
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.

Share this post


Link to post
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
Sign in to follow this  
Followers 0