Jump to content
Sign in to follow this  
name15

how to get if user selected item or not

Recommended Posts

name15

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 by name15

Share this post


Link to post
Share on other sites
blckpythn

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

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.