name15 Posted April 23, 2010 Posted April 23, 2010 (edited) how to get if user selected item or not if user no item selected then will _GUICtrlMenu_SetItemDisabled if user selected a item then will _GUICtrlMenu_SetItemEnabled like my function Func menu($FileView,$hmenu,$Name1) $p = _GUICtrlListView_GetItemCount($FileView) For $i = 0 to $p $Name = _GUICtrlListView_GetItemSelected(GUICtrlGetHandle($FileView),$i) If $Name = False Then For $i = 1 To $Name1 _GUICtrlMenu_SetItemDisabled(GUICtrlGetHandle($hmenu), $i) Next EndIf ExitLoop If $Name = True Then For $i = 1 To $Name1 _GUICtrlMenu_SetItemEnabled(GUICtrlGetHandle($hmenu), $i) Next EndIf Next EndFunc Edited April 23, 2010 by name15
blckpythn Posted April 23, 2010 Posted April 23, 2010 I had to figure this one out on my own here is a sample. Func D() If GUICtrlRead($D) = $GUI_CHECKED Then GUICtrlSetState($DateInput, $GUI_ENABLE) Else GUICtrlSetState($DateInput, $GUI_DISABLE) EndIf EndFunc ;==>D
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