Recent

Author Topic: Best way to create a button grid in lazarus?  (Read 1216 times)

randohinn

  • New Member
  • *
  • Posts: 13
Best way to create a button grid in lazarus?
« 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?

jamie

  • Hero Member
  • *****
  • Posts: 6090
Re: Best way to create a button grid in lazarus?
« Reply #1 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
The only true wisdom is knowing you know nothing

wp

  • Hero Member
  • *****
  • Posts: 11853
Re: Best way to create a button grid in lazarus?
« Reply #2 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