Exemplo n.º 1
0
        protected override Control CreateDefaultDropDownControl()
        {
            Xceed.Editors.WinTextBox dropDownControl = new Xceed.Editors.WinTextBox();
            dropDownControl.TextBoxArea.Multiline     = true;
            dropDownControl.TextBoxArea.WordWrap      = true;
            dropDownControl.TextBoxArea.ScrollBars    = System.Windows.Forms.ScrollBars.Vertical;
            dropDownControl.TextBoxArea.MaxLength     = this.TextBoxArea.MaxLength;
            dropDownControl.TextBoxArea.AcceptsTab    = true;
            dropDownControl.TextBoxArea.AcceptsReturn = false;
            switch (m_format)
            {
            case "Upper":
                dropDownControl.TextBoxArea.CharacterCasing = CharacterCasing.Upper;
                break;

            case "Lower":
                dropDownControl.TextBoxArea.CharacterCasing = CharacterCasing.Lower;
                break;

            case "Normal":
                dropDownControl.TextBoxArea.CharacterCasing = CharacterCasing.Normal;
                break;
            }
            // bug:宽度必须要大于ToolWindow,不然鼠标移到其他地方时会缩回去
            dropDownControl.Size = new System.Drawing.Size(300, 150);
            return(dropDownControl);
        }
 protected override Control CreateDefaultDropDownControl()
 {
     Xceed.Editors.WinTextBox dropDownControl = new Xceed.Editors.WinTextBox();
     dropDownControl.TextBoxArea.Multiline = true;
     dropDownControl.TextBoxArea.WordWrap = true;
     dropDownControl.TextBoxArea.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
     dropDownControl.TextBoxArea.MaxLength = this.TextBoxArea.MaxLength;
     dropDownControl.TextBoxArea.AcceptsTab = true;
     dropDownControl.TextBoxArea.AcceptsReturn = false;
     switch (m_format)
     {
         case "Upper":
             dropDownControl.TextBoxArea.CharacterCasing = CharacterCasing.Upper;
             break;
         case "Lower":
             dropDownControl.TextBoxArea.CharacterCasing = CharacterCasing.Lower;
             break;
         case "Normal":
             dropDownControl.TextBoxArea.CharacterCasing = CharacterCasing.Normal;
             break;
     }
     // bug:宽度必须要大于ToolWindow,不然鼠标移到其他地方时会缩回去
     dropDownControl.Size = new System.Drawing.Size(300, 150);
     return dropDownControl;
 }