Esempio n. 1
0
 private void This_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyData == Keys.Enter)
     {
         DropDown.Close();
     }
 }
Esempio n. 2
0
        /// <summary>
        /// Closes the DropDown if opened
        /// </summary>
        public void CloseDropDown()
        {
            if (DropDown != null)
            {
                DropDown.Close();
            }

            SetDropDownVisible(false);
        }
Esempio n. 3
0
        public void HideDropDown(ToolStripDropDownCloseReason reason)
        {
            if (_dropDown == null || !DropDown.Visible)
            {
                return;
            }

            // OnDropDownHide is called before actually closing DropDown
            OnDropDownHide(EventArgs.Empty);
            DropDown.Close(reason);
            Invalidate();
        }
        /// <summary>
        /// Handles the ShapeSelected event of the control control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
        void control_ShapeSelected(object sender, EventArgs e)
        {
            var shapee = (ShapeToolEventArgs)e;

            Tag   = shapee.Command;
            Image = _imgShape[((Core.ShapeBase)shapee.Command.Reserve).GetShapeType()];

            // Fire selected shape changed
            base.OnDropDownItemClicked(new ToolStripItemClickedEventArgs(null));

            DropDown.Close();
        }
Esempio n. 5
0
        void CustomTagKeyUp(object sender, KeyEventArgs e)
        {
            string tag = ((ToolStripTextBox)sender).Text.Trim();

            if (e.KeyCode != Keys.Enter || string.IsNullOrEmpty(tag))
            {
                return;
            }

            list.Tag(tag);
            DropDown.Close();
            ((ToolStripTextBox)sender).Clear();
            e.Handled = true;
        }
Esempio n. 6
0
 private void control_ColorSelected(object sender, EventArgs e)
 {
     DropDown.Close();
     OnOutlineChanged();
 }
Esempio n. 7
0
 public void SetValue()
 {
     parentList.myButtonText.text = Label;
     parentList.Value             = Value;
     parentList.Close();
 }