Mamba Posted December 20, 2006 Posted December 20, 2006 (edited) Question: I want to make a pic-control to change image like a checkbox state, checked or unchecked. And i don't know how to see if the pic- control was "checked" or not. Edited December 20, 2006 by Mamba
Scriptor Posted December 20, 2006 Posted December 20, 2006 It's a good question. I had the same Problem with a Icon in a button. Make behind the picture a button and disabled the pic
Mamba Posted December 20, 2006 Author Posted December 20, 2006 (edited) It's a good question. I had the same Problem with a Icon in a button. Make behind the picture a button and disabled the pic I have a map, is a disabled Pic control. And i want to make such thing. If i click on the city for ex, a "check" image apears, if i click again, a transparent pic is laoded instead of "check" image. I've tried to do this with a button with bitmap loaded but didnt work. Edited December 20, 2006 by Mamba
Scriptor Posted December 20, 2006 Posted December 20, 2006 OK. But I can't help you. I think you will one pic like a blue pic
Thatsgreat2345 Posted December 20, 2006 Posted December 20, 2006 the same as you would if a button was pressed
Mamba Posted December 20, 2006 Author Posted December 20, 2006 If works if for every pic i declare a boolean var to store the state. But if is there another way i want to know
Thatsgreat2345 Posted December 20, 2006 Posted December 20, 2006 ummm could u provide ur script ahahha im to lazy to code something up at the moment
Mamba Posted December 20, 2006 Author Posted December 20, 2006 (edited) expandcollapse popup#include <GUIConstants.au3> Opt("GuiOnEventMode", 1) Global $gui, $button, $true Main_Gui() While 1 Sleep (10) WEnd Func Main_Gui() $gui = GUICreate("Background", 820, 615) $combo = GUICtrlCreateCombo("", 675, 5, 130, 15, 0x0003) GUICtrlSetData($combo, "Регион 3|Регион 4|Регион 5|Регион 6|Регион 7|Регион 8|Регион 9|Регион 12", "Регион 8") GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit") GUISetState() $hGUI = GUICreate("", 665, 615, -1, -1, BitOR($WS_POPUP, $WS_VSCROLL, $WS_HSCROLL), BitOr($WS_EX_LAYERED,$WS_EX_MDICHILD),$gui) $map = GUICtrlCreatePic(@ScriptDir & "\8\region8_2.jpg", 80, 0, 0, 0) ;507x607 GuiCtrlSetState($map,$GUI_DISABLE) $button = GUICtrlCreatePic("none.jpg", 50, 50, 0, 0) GUICtrlSetOnEvent($button, "_Select") $true = False GUISetState() EndFunc Func _Select() If $true Then GUICtrlSetImage($button, "none.jpg") Else GUICtrlSetImage($button, "selected.jpg") EndIf $true = Not $true EndFunc Func _Exit() Exit 0 EndFunc Edited December 20, 2006 by Mamba
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