Results 1 to 2 of 2

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

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Sencha User
    Join Date
    Sep 2012
    Posts
    2
    Vote Rating
    0
      0  

    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
    Sencha User
    Join Date
    Aug 2016
    Posts
    2
    Vote Rating
    0
      0  

    Default

    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
    listContainer.setShadow(false);
    // 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
  •