1

Can I make a BoxPane (for example vertically) where one of the components within the BoxPane fills the avaible space?

For example here I would like the ScrollPane to take all avaible space which is left after the Label. BXML:

<BoxPane orientation="vertical" styles="{fill:true}">
    <Label text="Triggers:" />
    <ScrollPane preferredWidth="80" preferredHeight="110"
        horizontalScrollBarPolicy="fill"
        verticalScrollBarPolicy="fill_to_capacity"
        >
        <ListView bxml:id="listTriggers" selectMode="single"
            listData="['TRNIF_Trigger1'],['TRNIF_Trigger2'],['TRNIF_Trigger3']"
        />
    </ScrollPane>
</BoxPane>
ZoolWay
  • 5,411
  • 6
  • 42
  • 76

1 Answers1

4

It looks like BoxPane in Pivot is designed to take only minimal needed space. You have to use TablePane. This looks a bit unfortune to me because your BXML blows up when using a large frontend which should adapt to available space. For example within WinForms I can say to a component "Stick to your right border with 5px distance and resize if needed to do so".

Nevertheless, here is the BXML for above question / example:

<TablePane styles="{padding:8, horizontalSpacing:6, verticalSpacing:6}">
    <columns>
        <TablePane.Column width="1*" />
    </columns>

    <TablePane.Row height="-1">                     
        <Label text="Triggers:" />
    </TablePane.Row>

    <TablePane.Row height="1*">
        <ScrollPane
            horizontalScrollBarPolicy="fill"
            verticalScrollBarPolicy="fill_to_capacity"
            >
            <ListView bxml:id="listTriggers" selectMode="single"
                listData="['TRNIF_Trigger1'],['TRNIF_Trigger2'],['TRNIF_Trigger3']"
            />
        </ScrollPane>
    </TablePane.Row>
</TablePane>
ZoolWay
  • 5,411
  • 6
  • 42
  • 76