CoolControl Grid Framework

Grid

  The core of the managers is the TCoolGroupGridManager class. This class defines the layout of the items within the control. Note it does not define the layout of the individual item, such as where the text or image goes. It only defines a rectangular region that is assigned to the item.

  The TCoolGroupGridManager also contains the basic frame work to implement groups of items. These groups are defined by an area designated to the items they contain plus any boundaries around them. These boundaries are called Margins. The graphic below shows the GroupGridManager's default layout

 

  The layout is a sequential set of Groups. These groups can have a margin around them. There are a few built in variations to what is drawn in these margins, most were taken from the new grouping capability of the Microsoft Listview v6.0 and greater.

  The dimensions of these margins are defined by the GroupMarginBottom, GroupMarginLeft, GroupMarginRight, and GroupMarginTop properties.

  Within these margins is the area defined for the item that make up each group. By default the manager uses the CellW and CellH properties of the TCoolGroupGridManager and calculates how many columns will fit in the current client window. From that it calculates the number of rows needed for the number of items defined in the TCoolItemManager. Note when accessing the TCoolItemManager for the grid use only the VisibleXXXX properties. These properties take indexes based on the items that are currently visible and should be displayed in the grid.

 


mustangpeak.net

  Last Modified on: