3
votes

I am trying to create a a custom ListBoxItem style for my firemonkey listbox. I need to have 2 labels, 2 progress bars, and three buttons on each item.

The three buttons should all be aligned right. The remaining controls should be position in 2 rows. i.e. I need 1 label (aligned left) and 1 progress bar (aligned right) on top and another label and progress bar on bottom.

e.g.

enter image description here

I can get it to look like the follow.

i.e. 1 row of controls

enter image description here

but not 2 rows. I tried using a TGridLayout, and a TGridPanelLayout and placing the controls in them, but using those controls do not work in the style. I get crazy results.

Here is my Style sheet for one row of controls How can I get it to do two rows?

Another thing I tried was to add a Layout to hold both rows of controls, then a separate layout for each row.

enter image description here

Howeever, if I align on layout top and another layout bottom, then i have a gap when resizing

e.g.

enter image description here

1

1 Answers

1
votes

ahh, looks like I can do this with Anchors on the top row layout and bottom row layout to get the look I need (remove the gaps). I will keep it open and if someone gives a better answer on this, I will accept their answer