base class for widgets which show multi column and multi row data in a grid. Its main task is to manage gridcolumns of type hk_dsgridcolumn objects.
The grid can either automatically handle which gridcolumns should be shown. The exact handling can be defined with set_enablingbehaviour(). If you want to define the gridcolumns yourself use set_hold_rowdefinition(),clear_gridcolumn() and set_gridcolumns().
Inherits from hk_dsvisible.
- gridcolumn(col)
returns the hk_dsgridcolumn object at position number 'col'
- columnscount(void)
returns the number of columns shown in the grid
- set_gridcolumnwidth(column, newwidth)
sets the new width 'newwidth' of gridcolumn number 'column'.
- set_gridcolumns(columnnamelist)
you can manually set the gridcolumn definition. 'columnnamelist' is the new defintion of the gridcolumns, all values in this definition will be used
- clear_gridcolumn()
deletes the gridcolumn definition.
- set_hold_rowdefinition(hold)
If true and you change the row definitions (i.e. column size) after disabling and reenabling your definitions still exist, if false the rows will be newly built. Default is true. See also set_enablingbehaviour().
- set_enablingbehaviour(add_col,del_col)
If set_hold_rowdefinition() is true, this function defines what exactly to do during enabling If 'add_col' if true, columns of the datasource will be added to the grid if no equivalent gridcolumn exists. Default is false. If 'del_col' if true, gridcolumns will be removed if no equivalent columns in the datasource exist. Default is false.
- save_query([name[,ask]])
Saves the datasource and grid definition in a file in directory ~/.hk_classes/DRIVERNAME/HOST/DATABASENAME with the extenstion '.hk_query' and using the name 'name'. If 'ask' is True the user will be asked before overwriting an existing file.
- load_query()
loads the query definition with the name that is defined with set_name()
- save_table([name[,ask]])
Saves the grid definition in a file in directory ~/.hk_classes/DRIVERNAME/HOST/DATABASENAME with the extenstion '.hk_table' and using the name 'name'. If 'ask' is True the user will be asked before overwriting an existing file.
- load_table()
loads the table with the name that is defined with set_name()
- change_columnposition(from,to)
It's possible to change the order of the columns. 'from' is the original position of the gridcolumn, 'to' is the target position.
- set_rowheight(newheight [,registerchange])
Sets the height of all rows in the grid.
- rowheight()
returns the current rowheight.