Results 1 to 4 of 4

Thread: How remove focus from ComboBox

  1. #1

    Default How remove focus from ComboBox

    Hi! I have Dialog with several ComboBox elements. Last ComboBox may have different emptyText depending on value of previous ComboBox. When dialog opens ComboBox's emptyText is updated by invocation of setEmptyText on this element. The issue in the work of this method. When element has focus, empty text is assigned to "". Last ComboBox in dialog occurs in focus if I click ESC when I touched this combo. So after reopenning the dialog update of empty text results in incorrect value. How can I programmatically clear focusContext on FieldCell ? GXT 3.0.1 N.B. I have SelectionHandler on this combo and sets value of this when selection is changed

  2. #2
    Sencha User
    Join Date
    Feb 2009
    Location
    Minnesota
    Posts
    2,737

    Default

    Ideally the blur() method should achieve this.

    Have you tried with GXT 3.1? There are a large number of ComboBox fixes (many are in the superclass, TriggerField) in the 3.1.0 release that went out two weeks ago.

  3. #3

    Default

    Try this one. It is an examples for removing the Combobox


    public class CustomComboBox : ComboBox
    {
    private const int WM_SIZE = 0x0005;


    protected override void WndProc(ref Message m)
    {
    base.WndProc(ref m);


    // A fix for ComboBoxStyle.DropDown mode.
    if (DropDownStyle == ComboBoxStyle.DropDown
    && (m.Msg & WM_SIZE) == WM_SIZE)
    {
    Select(0, 0);
    }
    }
    }

  4. #4
    Sencha User
    Join Date
    Feb 2009
    Location
    Minnesota
    Posts
    2,737

    Default

    Sylvia Ellerr, it looks like you are writing C#, which isn't going to work very well in GWT/GXT which is written entirely in Java...

Tags for this Thread

Posting Permissions

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