private void SetStyleFlag(VTCStyleFlags bit, bool value)
 {
     if (value)
     {
         myStyleFlags |= bit;
     }
     else
     {
         myStyleFlags &= ~bit;
     }
 }
 private bool GetStyleFlag(VTCStyleFlags bit)
 {
     return (myStyleFlags & bit) == bit;
 }
 private bool GetAnyStyleFlag(VTCStyleFlags bits)
 {
     return 0 != (myStyleFlags & bits);
 }
        /// <summary>
        ///     Create a new VirtualTreeControl instance
        /// </summary>
        public VirtualTreeControl()
        {
            SetStyle(ControlStyles.UserPaint, false);
            SetStyle(ControlStyles.ContainerControl, true);
            //SetStyle(ControlStyles.StandardClick, false);
            SetStyle(ControlStyles.StandardDoubleClick, false);
            SetBounds(0, 0, 120, 96);

            // This call is required by the Windows.Forms Form Designer.
            InitializeComponent();

            UseVSThemeForTreeExpander = true;

            myIndentWidth = DEFAULT_INDENTWIDTH;
            myItemHeight = 16;
            myStyleFlags =
                VTCStyleFlags.MaskHasIndentBitmaps |
                VTCStyleFlags.ShowToolTips |
                VTCStyleFlags.IsDragSource |
                VTCStyleFlags.DisplayColumnHeaders |
                VTCStyleFlags.ExplicitLabelEdits |
                VTCStyleFlags.DistinguishFocusedColumn |
                VTCStyleFlags.EnableExplorerTheme;
        }