Hbox lookupField and timeField

Hello,

I want to display a timeField next to a lookupField:

<form id="form" dataContainer="myDc">
<column width="250px">
 <hbox>
             <lookupField id="countryField" property="country"/>
             <timeField id="autotime" datatype="time"/>
  </hbox>

Unfortunately the elements look in this way:
image
because I think each element occupies 250px.
However inside of a vbox or hbox (under a form) property doesn’t work and the lookupField doesn’t take data (is empty). Is it normal?

Please advise!
-n

Hi,

The first-level of nesting components get width of a column. In your case it’s hbox, so it’ll have width="250px". You placed two components with no size defined, i.e. with size AUTO, as a result, their positions intersect. The reason is that containers provide equal size slots for every component.

Take a look at the documentation for more details.

To resolve the issue, I’d recommend expanding the countryField component, so that it will occupy all available space, except that is needed for the autotime.

Regards,
Gleb

Thank you!

To solve this one, you’ll have to set the dataContainer properties for anything you nest in a hBox or vBox. I don’t like it either - IMO it should infer the DC from the parent container, but it doesn’t.

1 Like