Sign in to follow this  
Followers 0
redfive19

CheckBox question

8 posts in this topic

Case $nMsg = $Install_novell_client_chkbox
            If BitAND(GUICtrlRead($Install_novell_client_chkbox), $GUI_CHECKED) Then
                _SetNovellStateEnable()
            Else
                _SetNovellStateDisable()
            EndIf

Func _SetNovellStateEnable()
    GUICtrlSetState($install_ipx_chkbox, $GUI_ENABLE)
    GUICtrlSetState($novell_prefered_server_input, $GUI_ENABLE)
    GUICtrlSetState($novell_context_input, $GUI_ENABLE)
EndFunc

Func _SetNovellStateDisable()
    GUICtrlSetState($install_ipx_chkbox, $GUI_DISABLE)
    GUICtrlSetState($novell_prefered_server_input, $GUI_DISABLE)
    GUICtrlSetState($novell_context_input, $GUI_DISABLE)
EndFunc

All I want to do is when I check off the $Install_novell_client_chkbox for it to enable the controls underneath it (which by default are disabled/greyed out). This code above WORKS however those 3 controls are "blinky" - that is they blink when the GUI is active. Is there a better way of doing this that does not include running OnEventMode? Thank you ahead of time for your help!!

-Redfive

Share this post


Link to post
Share on other sites



This code above WORKS however those 3 controls are "blinky" - that is they blink when the GUI is active.

I dont understand what "Blinky" means. Thers no effect when Enable/Disable the controls, no flicker, no blinking (except theres sometimes a heavy dealy between Checkbox Mark and execution).

You'll have to post more code to find the error.


Teamspeak 3 User Viewer - Quick and functional TS3 Query script, which shows online users.Cached Screenshot Deleter - Deletes older Fraps Screenshots if they exceed a specified limit.Unresolved Topics:Intercept and modify dragdrop text behaviour in scite

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Case $nMsg = $Install_novell_client_chkbox

If BitAND(GUICtrlRead($Install_novell_client_chkbox), $GUI_CHECKED) Then

_SetNovellStateEnable()

Else

_SetNovellStateDisable()

EndIf

Don't use GuiCtrlRead. You need GuiCtrlGetState!

Edited by Lynix

Share this post


Link to post
Share on other sites

Don't use GuiCtrlRead. You need GuiCtrlGetState!

You would think that from the help file for GuiCtrlGetState, but have a look in the help file for GuiCtrlRead. You will see that redfive19 has the correct code.

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Case $nMsg = $Install_novell_client_chkbox
            If BitAND(GUICtrlRead($Install_novell_client_chkbox), $GUI_CHECKED) Then
                _SetNovellStateEnable()
            Else
                _SetNovellStateDisable()
            EndIf

Func _SetNovellStateEnable()
    GUICtrlSetState($install_ipx_chkbox, $GUI_ENABLE)
    GUICtrlSetState($novell_prefered_server_input, $GUI_ENABLE)
    GUICtrlSetState($novell_context_input, $GUI_ENABLE)
EndFunc

Func _SetNovellStateDisable()
    GUICtrlSetState($install_ipx_chkbox, $GUI_DISABLE)
    GUICtrlSetState($novell_prefered_server_input, $GUI_DISABLE)
    GUICtrlSetState($novell_context_input, $GUI_DISABLE)
EndFunc

All I want to do is when I check off the $Install_novell_client_chkbox for it to enable the controls underneath it (which by default are disabled/greyed out). This code above WORKS however those 3 controls are "blinky" - that is they blink when the GUI is active. Is there a better way of doing this that does not include running OnEventMode? Thank you ahead of time for your help!!

-Redfive

You haven't given all your code so this is my best guess.

Maybe you have a "Switch $nMsg" and not just "Switch". If this is the case the reason for the flicker is that your case statement should be

Case $install.....

and not

Case $nMsg = $install.... ; This will always be true once it is checked and so the case statements will be continually executed, hence the flicker.

Edited by martin

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites

you're right martin, but even with $nMsg = $Install_novell_client_chkbox i get no "blinking", it just changes when then checkbox is clicked.

I dont believe that a SetState $GUI_ENABLE on a Enabled GUI does any effect.


Teamspeak 3 User Viewer - Quick and functional TS3 Query script, which shows online users.Cached Screenshot Deleter - Deletes older Fraps Screenshots if they exceed a specified limit.Unresolved Topics:Intercept and modify dragdrop text behaviour in scite

Share this post


Link to post
Share on other sites

well Martin, you were right!!! I changed

Case $nMsg = $Install_novell_client_chkbox

to

Case $Install_novell_client_chkbox

and walla! it works without blinking! you were right, I have Switch $nMsg because I did this GUI in Koda. And as far as posting the rest of my code, it would take me so long to edit out company data, that I thought that this was fine just posting what I had. Sorry for the switch up but I thank all of you guys for your help. You guys rule :)

-redfive

Share this post


Link to post
Share on other sites

You would think that from the help file for GuiCtrlGetState, but have a look in the help file for GuiCtrlRead. You will see that redfive19 has the correct code.

:) Maybe I should install AutoIt on this computer to look on the help file

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0