Lazarus

Programming => LCL => Topic started by: randohinn on July 14, 2020, 10:58:20 pm

Title: Best way to create a button grid in lazarus?
Post by: randohinn on July 14, 2020, 10:58:20 pm
What's the best component or package to create a grid of buttons with n rows m columns of equal size cells, where I could just set the row and column indexes for the individual buttons?
Title: Re: Best way to create a button grid in lazarus?
Post by: jamie on July 14, 2020, 11:02:30 pm
TDrawGrid maybe ?

That gives you the grid where you can custom draw on the cells the image you want that could behave like buttons.

 
Or TFlowPanel
Title: Re: Best way to create a button grid in lazarus?
Post by: wp on July 15, 2020, 12:04:34 am
No special component needed, just use the ChildSizing property of the container. See attached demo.

[EDIT]
Sorry, I mixed up n and m in the demo.
TinyPortal © 2005-2018