gridLayout自适应分配宽度问题

文档中说容器宽度设置好后,内部元素的列宽度平均分配,但是现在并没有自适应平均分配。请问这个怎么解决?
image
image
image

我看了下,这里应该是翻译的问题,原文如下:

If you define the container width in pixels or percents, free space will be divided between the columns equally.

意思是空白部分在列中间平均分配。而不是列宽。@bryanyin

如果需要列平均分配,可以给每个组件加上 width="100%"

  <row>
      <comboBox id="TypeField" inputPrompt="123" width="100%" />
      <comboBox id="nField" inputPrompt="123" width="100%" />
      <dateField id="startDateField" caption="123" dateFormat="yyyy-MM-dd" width="100%"/>
      <dateField id="endDateField" caption="123" dateFormat="yyyy-MM-dd" width="100%"/>
      <comboBox id="sField" inputPrompt="" width="100%"/>
      <button id="queryBtn" caption="123" width="100%" />
      <button id="resetBtn" caption="123" width="100%"/>
  </row>
1 个赞

好 我试一下 谢谢您

谢谢你发现了文档的问题!

1 个赞