Menu

#1035 Combobox with Width of 100% Overruns

3.0.5
closed-fixed
nobody
5
2009-08-28
2008-06-20
No

The combobox overruns the width of the window by the length of the button.

Duplication Code

<window border="normal">
<combobox width="100%" >
<comboitem label="Simple and Rich"/>
<comboitem label="Cool!"/>
<comboitem label="Thumbs Up!"/>
</combobox>
</window>

Discussion

  • Jumper Chen

    Jumper Chen - 2008-06-23
    • status: open --> wont-fix-duplicate
     
  • Edward Jones

    Edward Jones - 2008-06-23

    Logged In: YES
    user_id=2126324
    Originator: NO

    Is this not fixable? I'm seeing this too and it is really strange to have several components size wrongly, when Nitobi, GWT and several other ajax kits do not have the sizing issues of ZK. Is the only resolution, in ZK, to use an explicit size as a workaround (100px)? Its just a shame that a some of the time savings of ZK are lost to strange ZK specific sizing issues.

     
  • nicholas wakefield

    Logged In: YES
    user_id=1357115
    Originator: YES

    Even though this is a duplicate, the original case does not offer enough guidance and won't fix for something that could be fixed is a little strange. If you don't have any luck fixing it I'll see if I can fix it. Is there a spec to follow somewhere?

     
  • nicholas wakefield

    • status: wont-fix-duplicate --> open-duplicate
     
  • Jumper Chen

    Jumper Chen - 2008-06-24

    Logged In: YES
    user_id=1684431
    Originator: NO

    This example is an experiment.

    <vbox style="border:1px solid black;" width="200px">
    <label id="label" value="test"/>
    <button label="add" onClick='label.value += "long........................................................................................."'/>
    <datebox width="100%"/>
    <datebox width="180px"/>
    </vbox>

    As you can see, the width of the first datebox is 95%, after you click the add button, the first button will automatically grow its width without any notification, but the second datebox will not change. This is the reason why we don't fix this bug for backward compatible.

     
  • nicholas wakefield

    Logged In: YES
    user_id=1357115
    Originator: YES

    I managed to create a new dsp which supports safari, ie7, ie6 and FF3 (haven't tried FF2 but it should work).

    If you use a table with 2 cells, one for the input field and one for the image button you can do it. For IE set the table display to inline and for all others use inline-block. Then if you set the width at the table level there is no overrun. You need to set the first cell to width of 100%.

    <table style="width: 250px; display:inline-block;vertical-align:bottom" border="0" cellpadding="0" cellspacing="0">
    <tr>
    <td style="width:100%"><input id="z_d9_k!real" class="comboboxinp" autocomplete="off" style="width: 100%;" type="text"></td>
    <td style="width:25px"><img style="position: relative; top: 0px;" id="z_d9_k!btn" src="combobox.zul_files/combobtn.gif"></td>
    </tr>
    </table>
    File Added: extcombobox.rar

     
  • nicholas wakefield

    Rough Solution

     
  • Jumper Chen

    Jumper Chen - 2008-06-30

    Logged In: YES
    user_id=1684431
    Originator: NO

    This way can fix this problem. But I don't know whether it breaks the look&feel that is customized for backward compatible.
    Can I invite you to write a small talk about how to fix this problem with your extension jar file?

    Thanks,
    Jumper

     
  • Jumper Chen

    Jumper Chen - 2008-09-03
    • priority: 5 --> 3
    • status: open-duplicate --> open
     
  • Jumper Chen

    Jumper Chen - 2009-08-28
    • priority: 3 --> 5
    • status: open --> closed-fixed
     
  • Jumper Chen

    Jumper Chen - 2009-08-28

    Fixed since Auguest 28 (ZK 5.0.0)

     

Log in to post a comment.

MongoDB Logo MongoDB