VAN0 Posted August 25, 2017 Posted August 25, 2017 (edited) Hello. Is there a way create a menu item in tray menu that would show as 3 state checkbox (indeterminate)? (I already have the functionality of 3nd state, just can't make it show visually) Thank you. Edited August 26, 2017 by VAN0
VAN0 Posted August 26, 2017 Author Posted August 26, 2017 I found a way by replacing type of menu item to radio for the indeterminate state, and switching back to checkbox for any other states: $val = 0 ; 0 = unchecked, 1 = checked, 2 = indeterminate $tMenuItem = TrayCreateItem("Test tray menu item") $type = 0 ; checkbox $checked = $TRAY_UNCHECKED If $val > 0 Then $checked = $TRAY_CHECKED If $val == 2 Then $type = $MFT_RADIOCHECK ;512 = radio EndIf _GUICtrlMenu_SetItemType(TrayItemGetHandle(0), $tMenuItem, $type, false) TrayItemSetState($tMenuItem, $checked)
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