Results 1 to 6 of 6

Thread: ComboBox - set maximum height

    This duplicates another bug already reported in our system: EXTGWT-3008
  1. #1
    Ext GWT Premium Member
    Join Date
    Mar 2010
    Posts
    67
    Vote Rating
    0
      0  

    Default ComboBox - set maximum height

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

  2. #2
    Sencha Premium Member
    Join Date
    Sep 2007
    Posts
    13,976
    Vote Rating
    131
      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
    67
    Vote Rating
    0
      0  

    Default

    Thank you, Sven.

  4. #4
    Ext GWT Premium Member
    Join Date
    Mar 2010
    Posts
    67
    Vote Rating
    0
      0  

    Default

    would this work?

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

  5. #5
    Sencha User
    Join Date
    Feb 2009
    Location
    Minnesota
    Posts
    2,737
    Vote Rating
    93
      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
    67
    Vote Rating
    0
      0  

    Default

    Works great. Thank you!

Posting Permissions

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