This duplicates another bug already reported in our system: EXTGWT-3008
  1. #1
    Ext GWT Premium Member
    Join Date
    Mar 2010
    Posts
    66
    Vote Rating
    0
    gorilla076 is on a distinguished road

      0  

    Default ComboBox - set maximum height

    ComboBox - set maximum height


    Is there an equivalent to setMaxHeight() for ComboBox in GXT 3.0?

  2. #2
    Sencha User
    Join Date
    Sep 2007
    Posts
    13,971
    Vote Rating
    132
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    The ComboBoxCell has an internal private member "maxHeight". You could use JSNI to access this.

    However i will move this thread to the bugs forum so a real public getter/setter will be added.

  3. #3
    Ext GWT Premium Member
    Join Date
    Mar 2010
    Posts
    66
    Vote Rating
    0
    gorilla076 is on a distinguished road

      0  

    Default


    Thank you, Sven.

  4. #4
    Ext GWT Premium Member
    Join Date
    Mar 2010
    Posts
    66
    Vote Rating
    0
    gorilla076 is on a distinguished road

      0  

    Default


    would this work?

    private native void setMaxHeight(ComboBoxCell<ListItem> cell, int height) /*-{
    cell.maxHeight = height;
    }-*/;

  5. #5
    Sencha - GXT Dev Team
    Join Date
    Feb 2009
    Location
    Minnesota
    Posts
    2,734
    Vote Rating
    90
    Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light

      0  

    Default


    Linking to http://www.sencha.com/forum/showthread.php?256877 and EXTGWT-2831, which is already opened on this issue.

    No, that will not work - you must refer to maxHeight by its fully qualified name. See https://developers.google.com/web-to...methods-fields for details on how to refer to Java fields in JSNI. Roughly (untested) this will be:
    Code:
      cell.@com.sencha.gxt.cell.core.client.form.ComboBoxCell::maxHeight = height;

  6. #6
    Ext GWT Premium Member
    Join Date
    Mar 2010
    Posts
    66
    Vote Rating
    0
    gorilla076 is on a distinguished road

      0  

    Default


    Works great. Thank you!

Thread Participants: 2