name15 0 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 Share this post Link to post Share on other sites
blckpythn 2 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 Share this post Link to post Share on other sites