Search the Community
Showing results for tags '_GUICtrl_OnHoverRegister'.
-
I create a picture as a button $historyon = GUICtrlCreatePic("off.jpg", 280, 500, 30, 30) GUICtrlSetState(-1, $GUI_DISABLE) $ButtonNext = GUICtrlCreateLabel("", 280, 500, 30, 30) GUICtrlSetCursor(-1, 0) GUICtrlSetColor(-1, 0xFFFFFF) GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) GUICtrlSetState(-1, $GUI_ENABLE) _GUICtrl_OnHoverRegister(-1, "_Hover_Proc", "_Leave_Hover_Proc", "PrimaryDown_Proc")From the innitiate state the button on the gui is in "off" position. When the button is pressed the picture should be changed to "on" position Later on I register the function for the button when it is pressed Func PrimaryDown_Proc($historyon) local $buttonon, $buttonoff Switch $historyon Case $ButtonNext if $historyswitchedon=0 then $buttonon = GUICtrlCreatePic("on.jpg", 280, 500, 30, 30) GUICtrlDelete ($buttonoff) ;MsgBox (0, "", "0") GUISetState() $historyswitchedon=1 Return EndIf if $historyswitchedon=1 then $buttonoff = GUICtrlCreatePic("off.jpg", 280, 500, 30, 30) GUICtrlDelete ($buttonon) ;MsgBox (0, "", "1") GUISetState() $historyswitchedon=0 Return EndIf EndSwitch EndFuncBut I am getting not stable result: Sometimes, the picture of button is changed directly when I press on it, sometimes it is not changed, sometimes it is keeping changing from position "on" to position "off" while the button is being pressed several times. What am I doing wrong?
-
I created a program that allows the user to create a countdown showing days, hours, minutes, and seconds left. The colors fade from dark to light. You may also change the color of each column, red, green, or blue. Or shades of grey. The program also uses MrCreatoR's If you choose not to use the hover effect, just remove the lines of code that uses it. It makes it much more stylish with it. Countdown.au3 I made this because of Elder Scrolls V: Skyrim !
-
- countdown
- count-down
-
(and 3 more)
Tagged with: