c# - Tri State Chech box for ToolStripDropDownButton -


i have statusbar strip toolstripmenuitems. need gruop toolstrip menu items , implement tristatecheckbox functionality,

  1. is possible create checkbox toolstripmenitems?
  2. if not possible point 1, how add treeview statusstrip. enter image description here

to have three-state menu item, can set checkstate of each toolstripmenuitem indeterminate, checked or unchecked.

enter image description here

also if want use tree-view control (which doesn't have builtin support three-state check boxes) or this control, should know, can host control in drop-down using toolstripcontrolhost. example, here toolstriptreeview control:

using system.componentmodel; using system.windows.forms; using system.windows.forms.design; [toolstripitemdesigneravailability(toolstripitemdesigneravailability.contextmenustrip)] public class toolstriptreeview : toolstripcontrolhost {     [designerserializationvisibility( designerserializationvisibility.content)]     public treeview treeviewcontrol { { return (treeview)control; } }     public toolstriptreeview() : base(createcontrol()) { }     private static treeview createcontrol()     {         var t = new treeview();         return t;     } } 

enter image description here


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -