KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Using Button Grids vs. Duplicate on Matrix
PRODUCT: 4D | VERSION: 6.5 | PLATFORM: Mac & Win
Published On: September 21, 2001

A button grid is a transparent object that is placed on top of a graphic on a form. The graphic should depict a row by column array. You can use a button grid object to determine where the user clicks on the graphic. Your object method would use the On Clicked event and take appropriate action depending on the location of the click. The value of the Button Grid variable will be the number of the cell clicked, starting from the upper left corner and proceeding across and down the grid.

If you need more precise control over the behavior or appearance of a control, then consider using the Duplicate on Matrix command in the Object menu of the Form Editor. This allows you to create a matrix object, place a control such as a button in the upper left cell, and then automatically replicate that object across every cell in the matrix. Using this technique you can create a control that behaves similarly to a button grid, but using individual controls such as highlight or invisible buttons.

For more details, see Chapter 5 of the 4th Dimension Design Reference, "Working with Fields and Active Objects."

ftp://ftp.4D.com/../4D_PRODUCT_DOCUMENTATION/