Home Forums WinForms controls Xceed Grid for WinForms WinComboBox drop down behavior

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #15637 |

    When using a standard .NET ComboBox control, a user can click anywhere on the control to activate the drop down (when set to DropDownList). With my Xceed WinComboBox, the user has to click on the little triangle to make it drop down. How can I make WinComboBox behave like ComboBox? This will drive our users crazy.

    Imported from legacy forums. Posted by Chris (had 2415 views)

    Xceed Support
    Member
    Post count: 5658

    You can subscribe to the Click event from the TextBoxArea and force the DropDown to open at each click.

    e.g.,
    <code>
    private void Form1_Load( object sender, EventArgs e )
    {
    winComboBox1.TextBoxArea.Click += new EventHandler( TextBoxArea_Click );
    }

    void TextBoxArea_Click( object sender, EventArgs e )
    {
    winComboBox1.OpenDropDown();
    }
    </code>

    Imported from legacy forums. Posted by CharlesB (had 272 views)

    User (Old forums)
    Member
    Post count: 23064

    Thanks! That’s exactly what I needed. If anyone else implements this, I would recommend the following change:

    private void wcboReportFormat_TextBoxArea_Click(object sender, EventArgs e)
    {
    if(wcboReportFormat.DroppedDown)
    {
    wcboReportFormat.CloseDropDown();
    }
    else
    {
    wcboReportFormat.OpenDropDown();
    }
    }

    Imported from legacy forums. Posted by Chris (had 3460 views)

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.