[Logo]
Forums Register Login
Ideas on achieving this using group layout?
Hello,

I've been playing about with GroupLayout manager and what I want to achieve is a several componets stacked on top of each other followed by 2 evenly spaced buttons. I'm not quite sure how to achieve this. If you look at the simple example I have below where I'm trying to have a central label followed by 2 evenly spaced buttons but my label is off centre.

Please ignore any variables I have declared and not used.




As you would see, the label is not evenly spaced above the two buttons. I can follow GroupLayout for more regular layouts but this is more awkward. Could someone point me in the right directions please?

Thanks,

Colm
GroupLayout is designed for UI builders. You can achieve the effect you desire by nesting layouts.
e.g. Have a container with FlowLayout, center aligned.
Add the label.
Create another container. Add buttons to it.
Add this container to the original container.
Thanks for replying Maneesh.


Yes I can achieve that using a flow layout on a new panel and adding the buttons and it looks fine. I was just trying to do it using the GroupLayout as I had other items on my GUI designed by hand using Group Layout also.


Colm


Wink, wink, nudge, nudge, say no more ... https://richsoil.com/cards



All times above are in ranch (not your local) time.
The current ranch time is
Nov 17, 2017 21:54:59.