Position child widgets vertically in a container widget (GroupBox)

Hello Community,

Is there a way to position child widgets in a container vertically (e.g. GroupBox)?
I’ve been hoping that this can be achieved with the ‘alignment’ property of a container widget combined with ‘childPositioning = relative’, but the child widgets get stacked vertically only when the space runs out.
I’m hoping to replicate the behaviour of a Stackpanel in a XAML language.
See the uploaded picture for more details.

How do you tackle the positioning of widgets in a content without manually specifying positions and margins of every single widget?

Hi Miroslav,

I’m not happy with this behavior, too.

Maybe you can put GroupBoxes around each Button in the GroupBox. You can set Width property of the inner GroupBoxes to 100%.
Perhaps this works as workaround for you. :slight_smile:

2 Likes

@Miroslav , welcome to the community and thanks for your question.
The vertical vs horizontal settings is really just setting which way the widget should scroll if there is more content than space for it.

But I have two other suggestions to force vertical arrangement.

#1 - GroupBox2 if you truly only have buttons, I would use a ButtonBar widget (relative, autoscroll=true). The buttons have a width 0f 100% and only a top and bottom margin. ButtonBar is only useful if you don’t need multiple buttons active at the same time.

#2 - GroupBox3: similar to @Simon_Stoll 's suggestion, use a groupbox (text removed) to encapsulate all your buttons(widgets). Optionally use the same 100% width setting for the buttons. You can see below only the numeric input is set to a percentage since it moves with the width of the GroupBox.

VerticalOptions

2 Likes

@Simon_Stoll @marcel.voigt , thank you both for the suggestions. :slight_smile:

It will do for now as a workaround.

Hopefully, we will get a way in the future to modify the underlying HTML/CSS, since this would be a matter of seconds to change.

3 Likes

Hello Miroslav!

I would just like to mention that from Automation Studio 6, mapp View 6 we will offer licensed package called Widget Development Tool Chain (WDTC), with which you could adopt/create mapp View widgets. Since this is a tool with which our R&D create widgets, there is certain knowledge needed for using it.

Thank you,
Andrej

2 Likes

Hello @Kolma,

thank you for the heads-up information. It sounds really interesting. Already looking forward to trying it out. :slight_smile: