Hi,
gibt es eine Abfrage, ob in einem GUI auf ein Label geklickt wurde? Z.B. Klicke ich mit der Maus ganz gewöhnlich auf den Text und es erscheint ein neues GUI. Im Grunde wie ein Button, nur ohne den Button^^
Ich hoffe ihr könnt mir weiterhelfen.
Aquaplant
Auf Label klicken
-
- [ gelöst ]
-
Aquaplant -
23. Dezember 2009 um 16:10 -
Geschlossen -
Erledigt
-
-
Das macht keinen Unterschied. Du kannst ein Label ganz gleich wie einen Button abfragen.
-
Bsp:
Spoiler anzeigen
[autoit]
[/autoit] [autoit][/autoit] [autoit]
#include <GUIConstantsEx.au3>Opt('MustDeclareVars', 1)
[/autoit] [autoit][/autoit] [autoit]Example()
[/autoit] [autoit][/autoit] [autoit]Func Example()
[/autoit] [autoit][/autoit] [autoit]
Local $widthCell, $msg, $iOldOpt, $1GUICreate("My GUI") ; will create a dialog box that when displayed is centered
[/autoit] [autoit][/autoit] [autoit]GUISetHelp("notepad") ; will run notepad if F1 is typed
[/autoit] [autoit][/autoit] [autoit]
$iOldOpt = Opt("GUICoordMode", 2)$widthCell = 70
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]
$1= GUICtrlCreateLabel("Line 1 Cell 1", 10, 30) ; first cell 70 widthGUISetState() ; will display an empty dialog box
[/autoit] [autoit][/autoit] [autoit]; Run the GUI until the dialog is closed
[/autoit]
while 1
$msg = GUIGetMsg()
Switch $msg
case $GUI_EVENT_CLOSE
exit
case $1
MsgBox(1, "", "Label geklickt")
EndSwitch
wend
$iOldOpt = Opt("GUICoordMode", $iOldOpt)
EndFunc ;==>Example -
Ach wie genial
Als ich es früher mal ausprobiert habe war wohl meine Abfrage falsch, damals ist das nämlich immer "angeklickt" worden^^
Danke