phew Posted August 1, 2008 Share Posted August 1, 2008 hey, i created a little gui and added an icon via guictrlcreateicon() to it. now i want to interact with this icon, ie. when i click on the icon then should pop up some msgbox(). how do i do that? well my icon is a folder and i'd need it for FileOpenDialogue() but i have no clue how to detect a mouseclick that hit it! greetings Link to comment Share on other sites More sharing options...
ProgAndy Posted August 1, 2008 Share Posted August 1, 2008 Like a normal button With GUIGetMsg() *GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes Link to comment Share on other sites More sharing options...
phew Posted August 1, 2008 Author Share Posted August 1, 2008 Like a normal button With GUIGetMsg()is there no waii to use an icon/pic as button instead of creating a button by guictrlcreatebutton()? Link to comment Share on other sites More sharing options...
ProgAndy Posted August 1, 2008 Share Posted August 1, 2008 Cant't you read ^^ LIKE a button ... So you can use Icons: $pic = GUICtrlCreateIcon... $msg = GUIGetMsg() If $msg = $pic Then ... *GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes Link to comment Share on other sites More sharing options...
JFee Posted August 1, 2008 Share Posted August 1, 2008 (edited) You're overlooking what Andy said. You can detect a mouse click on ANY control the same way you would a button. $Icon = guictrlcreateicon(...) $msg = guigetmsg() switch $msg case $Icon ; CODE HERE endswitch EDIT: Darn, beat me to it Edited August 1, 2008 by JFee Regards,Josh Link to comment Share on other sites More sharing options...
phew Posted August 1, 2008 Author Share Posted August 1, 2008 Cant't you read ^^ LIKE a button ... So you can use Icons:$pic = GUICtrlCreateIcon...$msg = GUIGetMsg()If $msg = $pic Then ...ahhhh sorry my bad!nuff thanks Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now