Purpose
A column whose width is to be adapted automatically to the width of the bBrowser or to the width of the remaining columns.
Class
Type
Access / Assign
Data Type
bDataColumn | DWord | String | Symbol
Description
bBrowser:AutoWidthColumn defines a column whose width is adapted automatically, if
•a new column is opened,
•an opened column is closed,
•the width of the bBrowser is changed or
•the width of an opened column is changed.
The column for automatic width adjustment must first have been opened (see also bBrowser:OpenColumn()) and may not be frozen (see also bBrowser:Freeze).
The following table defines the supported data types with which width adjustments can be defined:
Data type / Value |
Description |
BCOLUMN_FIRST |
First opened column in the dynamic data area. |
BCOLUMN_LAST |
Last opened column in the dynamic data area. |
DWord |
Number of the column. The column must be contained in the list of opened columns (see also bBrowser:ColumnOpenList). |
Symbol |
Name of column as symbol. The column must be contained in the list of opened columns (see also bBrowser:ColumnOpenList). |
String |
Name of column as string. The column must be contained in the list of opened columns (see also bBrowser:ColumnOpenList). |
bDataColumn |
Column as object of class bDataColumn. The column must be contained in the list of opened columns (see also bBrowser:ColumnOpenList). |
Samples
The following sample activates the automatic width adjustment for the column #LASTNAME. Additionally for the column a minimum width of 20 pixels is defined.
// Open data server
odbsCUSTOMER := DBServer{"CUSTOMER"}
IF odbsCUSTOMER:Used
// link browser to data server and open the
// column #ID, #LASTNAME and #FIRSTNAME
oBrowser:Use(odbsCUSTOMER,, {#ID, #LASTNAME, #FIRSTNAME})
// activate for column #LASTNAME the automatic
// width adjustment
oColumn := oBrowser:GetColumn(#LASTNAME)
IF !EMPTY(oColumn)
oColumn:WidthMin := 20
oBrowser:AutoWidthColumn := oColumn
ENDIF
ENDIF
The following sample activates the automatic width adjustment for the first column.
// Open data server
odbsCUSTOMER := DBServer{"CUSTOMER"}
IF odbsCUSTOMER:Used
// link browser to data server
oBrowser:Use(odbsCUSTOMER)
// activate the automatic width adjustment
// for the first column
oBrowser:AutoWidthColumn := BCOLUMN_FIRST
ENDIF
See Also
bBrowser:AdjustAutoWidthColumn()
Page url: http://www.YOURSERVER.com/index.html?bbrowser_autowidthcolumn.htm