+ Reply to Thread
Results 1 to 2 of 2

Thread: combo box

  1. #1
    Hrcko is offline Junior Member Hrcko is on a distinguished road
    Join Date
    Jun 2008
    Posts
    2
    Rep Power
    0

    combo box

    How to change dropdownstyle on focus?
    When control is in focus I want to have style simple, but when a user start typing text i want to change it into dropdownlist. So he can type only what is in list.

  2. #2
    mathelda is offline Junior Member mathelda is on a distinguished road
    Join Date
    Jan 2010
    Posts
    12
    Rep Power
    0
    I'm not sure why it does that, although I never found it problematic as a
    ComboBox isn't a TextBox even though you can sometimes write in it. You can
    however override the selection in the focus/enter events, but unless you keep
    track of the cursor position the cursor will for the ComboBox always be at
    the end.

    void comboBox1_GotFocus(object sender, EventArgs e)
    {
    comboBox1.SelectionStart = comboBox1.Text.Length;
    }

    void textBox1_Enter(object sender, EventArgs e)
    {
    textBox1.SelectAll();
    }

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. update combo box in jsp without reload
    By jeyasree in forum AJAX Questions
    Replies: 0
    Last Post: 08-04-2009, 02:13 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts