Results 1 to 2 of 2

Thread: How to set XTemplate for List Container in ComboBox GXT 3.0

  1. #1

    Default How to set XTemplate for List Container in ComboBox GXT 3.0

    I found that, in GXT 2.0, we can set a HTML template to the List Container of ComboBox by setTemplate() method. So we can customize the displaying items List very flexible.
    However, I can not find out anyway to customize List of ComboBox GXT 3.0 by using HTML template like that.
    Please can any one tell me how to do for customizing the List Container of ComboBox in GXT 3.0.

    Thanks in advance

    PS: I have already played with ListView by setting ListViewAppearance. But it's not stronger like setTemplate() of 2.0.

    Besides, I have tried with ComboBoxCell, however I can not access the field listContainer (VerticalLayoutPanel class) for customizing.

  2. #2


    Assuming you are inside Constructor of ComboBox.Use this code

    if(this.getListView().getParent() instanceof VerticalLayoutContainer){
    VerticalLayoutContainer listContainer = (VerticalLayoutContainer) this.getListView().getParent();
    // for example to set shadow false here
    // you can manipulate any other listContainer property or itself


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