Esempio n. 1
0
        /// <summary>
        ///     A constructor for derived classes.
        /// </summary>
        /// <param name="inPlaceControl">The control to inplace activate</param>
        protected VirtualTreeInPlaceControlHelper(Control inPlaceControl)
        {
            myInPlaceControl = inPlaceControl;

            // default flags
            myFlags = VirtualTreeInPlaceControls.SizeToText | VirtualTreeInPlaceControls.DisposeControl;
        }
Esempio n. 2
0
 /// <summary>
 ///     Called when the Flags value is changed.
 /// </summary>
 /// <param name="oldFlags">The old value of the Flags property</param>
 protected abstract void OnFlagsChanged(VirtualTreeInPlaceControls oldFlags);
 /// <summary>
 ///     Called when the Flags value is changed.
 /// </summary>
 /// <param name="oldFlags">The old value of the Flags property</param>
 protected abstract void OnFlagsChanged(VirtualTreeInPlaceControls oldFlags);
        /// <summary>
        ///     A constructor for derived classes.
        /// </summary>
        /// <param name="inPlaceControl">The control to inplace activate</param>
        protected VirtualTreeInPlaceControlHelper(Control inPlaceControl)
        {
            myInPlaceControl = inPlaceControl;

            // default flags
            myFlags = VirtualTreeInPlaceControls.SizeToText | VirtualTreeInPlaceControls.DisposeControl;
        }
 /// <summary>
 ///     Called when the Flags value is changed.
 /// </summary>
 /// <param name="oldFlags">The old value of the Flags property</param>
 protected override void OnFlagsChanged(VirtualTreeInPlaceControls oldFlags)
 {
     if (Parent != null)
     {
         Parent.LabelEditFlagsChanged(oldFlags, Flags);
     }
 }
 private void LabelEditFlagsChanged(VirtualTreeInPlaceControls oldFlags, VirtualTreeInPlaceControls newFlags)
 {
     if (myInPlaceControl != null)
     {
         if (0 != ((newFlags & VirtualTreeInPlaceControls.DrawItemText) ^ (oldFlags & VirtualTreeInPlaceControls.DrawItemText)))
         {
             SetStateFlag(VTCStateFlags.LabelEditTransparent, 0 != (newFlags & VirtualTreeInPlaceControls.DrawItemText));
             InvalidateItem(
                 myEditIndex, myEditColumn, NativeMethods.RedrawWindowFlags.Invalidate | NativeMethods.RedrawWindowFlags.Erase);
         }
     }
 }