So I've been learning how to program a ReAction GUI and I'm seriously loving it! Well, not quite, LOL. Seriously spending the last week building up my new GUI, while getting over compiler errors, crashes and fixing faults. :-)
So I'm am quite happy with my progress after looking at example code and seeing how it's done. Unfortunately, the OS4 wiki has old examples that use older methods they don't recommend anymore, nor do they compile for me. Without the Trixie examples I'd be more lost.
So in my window I divided up an interface vertically into three named groups with a box. Inside the boxes are cycle gadgets or choosers as they are called in ReAction parlance. I finally got these displaying normally and added lables. I found labels to be quirky because they can't be added as part of the gadget tags, but added seperately to the layout, as if it was an afterthought. And then, not as simple text, but it needs to have text converted to an image. It's a useful toolkit obviously, being able to calculate layout of multiple groups, but it has a way of making a simple asset like label text slightly over complicated. It wants objects for everything which means it must all be stored and managed. And all the classes and gadgets must all be pre-opened by name.
My current issue is the gadgets look untidy because they are all in different spots. The labels are in different sizes so all the group choosers are offset in different positions. What I would like is for all the gadget lables to be in the same space, taking up the same width, like in a table. So all the gadgets align. But, it doesn't look like there is an easy way of doing so.
So, I found LAYOUT_LabelWidth and LAYOUT_AlignLabel, which looks like what I need. However, there are no examples of either I found, in the SDK or the net. One takes a width, so I would need to calculate the width of all the labels myself possibly, then find the longest and pass that. The other takes a layout and somehow needs to be linked to all groups in a way that isn't fully clear to me. Another option is to cheat and add space to the front of a label so it it's falsely bigger, but I tried that, and it doesn't work.
So, what would be the easiest way to solve it, while making use of the toolkit features? :-)