Hello, is there a possibility to create a relative layout in FS? Currently our test form consists of several blocks with different number of imput fields. We would rather not define the exact height and width in pixels for each item and it looks pretty good except the interval between 2 items in the block with the smaller number of items. The IDE interface does not have the ability to set the height of the cells or rows in pixel or % equivalent. Is there any way to eliminate the space between 2 rows? (I thought it would be a good idea to attach the screenshots for clarification but I don't have enough karma points to do that).

ALso I would like to add that this test form is our POC of migration of Oracle FOrms10 to FS. And here I noticed the comment that soon there will be a functionality for the simplier layout conversion. Probably this can solve the issue?

asked 04 Jun '13, 07:06

anatoly4u's gravatar image

anatoly4u
6913
accept rate: 0%

edited 04 Jun '13, 08:16

oskansavli's gravatar image

oskansavli ♦♦
3604

Hi Anatoly,

Could you please paste your Panel XML here? We will give you the ability to upload pictures but the Panel XML you wrote is actually more important.

Regarding the Forms to FS conversion. We do not have the bandwidth to work on a conversion project. But there are users/customers who are collaborating on such a project. I don't know how far they have progressed. Maybe George and Michiel can provide more information.

(04 Jun '13, 07:10) Yalim Gerger ♦♦

Sure, here it is. The changes to the cellSpacing tag (0,1,2) do not reflect in the layout:

<panel borderType="TitledBorder" borderTitle="Маршрут">
  <tableLayout cellSpacing="5">
    <row>
      <cell>
        <textLabel label="Маршрут" text-align="Right"/>
      </cell>
      <cell>
        <textField column="RTIP_ROUTE" dataSource="SB_RTIP1"/>
      </cell>
    </row>
    <row>
      <cell>
        <textLabel label="Прибыл в Москву из" text-align="Right"/>
      </cell>
      <cell>
        <comboBox displayColumn="AIRP_CODE" valueColumn="AIRP_ID" column="RTIP_AIRP_O" dataSource="SB_RTIP1" listDataSource="SB_AIRP1"/>
      </cell>
    </row>
    <row>
      <cell>
        <textLabel label="Следовал в" text-align="Right"/>
      </cell>
      <cell>
        <comboBox displayColumn="AIRP_CODE" valueColumn="AIRP_ID" column="RTIP_AIRP_DEST" dataSource="SB_RTIP1" listDataSource="SB_AIRP1"/>
      </cell>
    </row>
  </tableLayout>
</panel>
(04 Jun '13, 07:28) anatoly4u

sorry for your time. Seems the rught tag to be used is <row heightpolicy="Dynamic">

(04 Jun '13, 07:33) anatoly4u

No need to use heightPolicy. It's a special attribute for dynamically sized components such as grid and textlabels when their height may change during runtime. Just using height attibute would do the work for your case.

(04 Jun '13, 07:43) oskansavli ♦♦

You should set height attributes for rows. When no height is specified, rows are expanded to fit panel size, but components stay with default heights and aligned to center. That's why those spaces occur.

<row height="20">
  <cell>
    <textLabel label="Маршрут" text-align="Right"/>
  </cell>
</row>
link

answered 04 Jun '13, 07:38

oskansavli's gravatar image

oskansavli ♦♦
3604
accept rate: 45%

thanks for your comment but the actual question was if there is or will be a possibility to set something like 3% as a height of a row. But seems that it is not needed as <row heightpolicy="Dynamic"> tag solved the issue with blank space at least in our case.

(04 Jun '13, 07:41) anatoly4u

Actually the cause of the spaces is percentage row heights. (Your rows are percentage because no height is set, each row is 33% since there are 3 rows). You should instead use fixed height to eliminate those spaces. If you don't know height of components, you may use heightPolicy as well. It checks content of component after rendering and sets a fixed height for you.

(04 Jun '13, 07:52) oskansavli ♦♦

Setting percentage heights for the rows is not possible by the way. Only percentage behavior is leaving height attribute empty.

(04 Jun '13, 07:56) oskansavli ♦♦
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×16
×6
×3
×3

Asked: 04 Jun '13, 07:06

Seen: 1,092 times

Last updated: 04 Jun '13, 08:22


© Copyright Gerger 2017