Jump to content

Recommended Posts

Posted

Lets say I have this code:

#include <GUIConstants.au3>

#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 350, 159, 378, 189)
$Button1 = GUICtrlCreateButton("Button1", 24, 64, 129, 25, 0)
$Button2 = GUICtrlCreateButton("Button2", 176, 64, 153, 25, 0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Button1
        ;MsgBox(0,"","TEST")
        ;some code 
        Case $Button2
            tooltip("Button 2")

    EndSwitch
WEnd

What I want to do: when I push Button1 the $nMsg to capture a mesage coresponding to $Button2 so that the tooltip will apear ?

How could it be done? need example

I do not like stupid and idiot people that write idiot things...If you are one, do not write.

Posted

Lets say I have this code:

#include <GUIConstants.au3>

#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 350, 159, 378, 189)
$Button1 = GUICtrlCreateButton("Button1", 24, 64, 129, 25, 0)
$Button2 = GUICtrlCreateButton("Button2", 176, 64, 153, 25, 0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Button1
    ;MsgBox(0,"","TEST")
    ;some code 
        Case $Button2
            tooltip("Button 2")

    EndSwitch
WEnd

What I want to do: when I push Button1 the $nMsg to capture a mesage coresponding to $Button2 so that the tooltip will apear ?

How could it be done? need example

Use ControlClick ().
Posted

Thank you!

But does not work if a Gui Child has focus, and I whant to send a click to a button from the parent GUI....

I have a Parent GUI that contains a TreeView, and a Child GUI.

When I push a button from the child GUI a want to send a click (or a msg) to a TreeViewItem from the Parent Gui. With sendind a click, doesn't work.

I do not like stupid and idiot people that write idiot things...If you are one, do not write.

Posted

Try to focus ControlFocus ()

doesn't work...

maybe with: GUICtrlSendMsg ( controlID, msg , wParam, lParam ), but I do not know what values should have msg , wParam, lParam

I do not like stupid and idiot people that write idiot things...If you are one, do not write.

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
  • Recently Browsing   0 members

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