Purpose
Determines various settings from columns.
Class
Type
Method
Syntax
<oBrowser>:GetFormatFromColumns(
<iOptions>,
[<auColumn>]
) Æ auFormat
Arguments
<iOptions> | The options define the columns and their settings which should be determined. Several options can be combined. The following table defines the supported options: |
Option |
Description |
Name in Return Value |
BGFFCO_NONE |
There are no settings from the columns returned. The return value is an empty array. |
|
BGFFCO_ALLCOLUMNS |
There are returned settings for all supported columns (see also bBrowser:ColumnList). |
|
BGFFCO_OPENCOLUMNS |
There are returned settings for all open columns (see also bBrowser:ColumnOpenList). |
|
BGFFCO_FORMAT_AUTOEDIT |
The value from access bDataColumn:AutoEdit will be returned. |
#AutoEdit |
BGFFCO_FORMAT_CAPTION |
The value from access bDataColumn:Caption will be returned. |
#Caption |
BGFFCO_FORMAT_CAPTIONVIEW |
The value from access bBrowserColumn:CaptionView will be returned. |
#CaptionView |
BGFFCO_FORMAT_CAPTIONVISIBLE |
The value from access bBrowserColumn:CaptionVisible will be returned. |
#CaptionVisible |
BGFFCO_FORMAT_DATAVIEW |
The value from access bBrowserColumn:DataView will be returned. |
#DataView |
BGFFCO_FORMAT_EDITABLE |
The value from access bDataColumn:Editable will be returned. |
#Editable |
BGFFCO_FORMAT_EDITCLOSEFLAGS |
The value from access bDataColumn:EditCloseFlags will be returned. |
#EditCloseFlags |
BGFFCO_FORMAT_EDITSTARTFLAGS |
The value from access bDataColumn:EditStartFlags will be returned. |
#EditStartFlags |
BGFFCO_FORMAT_FIELDSPEC |
The value from access bDataColumn:FieldSpec will be returned. |
#FieldSpec |
BGFFCO_FORMAT_FOOTER |
The value from access bBrowserColumn:Footer will be returned. |
#Footer |
BGFFCO_FORMAT_FOOTERVIEW |
The value from access bBrowserColumn:FooterView will be returned. |
#FooterView |
BGFFCO_FORMAT_FOOTERVISIBLE |
The value from access bBrowserColumn:FooterVisible will be returned. |
#FooterVisible |
BGFFCO_FORMAT_HEIGHTVARIABLE |
The value from access bDataColumn:HeightVariable will be returned. |
#HeightVariable |
BGFFCO_FORMAT_MOVABLE |
The value from access bBrowserColumn:Movable will be returned. |
#Movable |
BGFFCO_FORMAT_RESIZABLE |
The value from access bBrowserColumn:Resizable will be returned. |
#Resizable |
BGFFCO_FORMAT_SELECTABLE |
The value from access bDataColumn:Selectable will be returned. |
#Selectable |
BGFFCO_FORMAT_SUSPENDEMPTYVALUES |
The value from access bDataColumn:SuspendEmptyValues will be returned. |
#SuspendEmptyValues |
BGFFCO_FORMAT_TEXTFORMAT |
The value from access bDataColumn:TextFormat will be returned. |
#TextFormat |
BGFFCO_FORMAT_TOOLTIPTEXT |
The value from access bDataColumn:TooltipText will be returned. |
#TooltipText |
BGFFCO_FORMAT_VALUETRANSFORMLIST |
The value from access bDataColumn:ValueTransformList will be returned. |
#ValueTransformList |
BGFFCO_FORMAT_VIEWEMPTYVALUEAS |
The value from access bDataColumn:ViewEmptyValuesAs will be returned. |
#ViewEmptyValuesAs |
BGFFCO_FORMAT_VIEWVALUEAS |
The value from access bDataColumn:ViewValueAs will be returned. |
#ViewValueAs |
BGFFCO_FORMAT_WIDTH |
The value from access bBrowserColumn:Width will be returned. |
#Width |
BGFFCO_FORMAT_WIDTHMAX |
The value from access bDataColumn:WidthMax will be returned. |
#WidthMax |
BGFFCO_FORMAT_WIDTHMIN |
The value from access bDataColumn:WidthMin will be returned. |
#WidthMin |
BGFFCO_FORMATSETTINGS_CAPTION |
Combination of all options which refer to column caption settings. These are the following options: •BGFFCO_FORMAT_CAPTION •BGFFCO_FORMAT_CAPTIONVIEW •BGFFCO_FORMAT_CAPTIONVISIBLE |
|
BGFFCO_FORMATSETTINGS_DATA |
Combination of all options which refer to column data settings. These are the following options: •BGFFCO_FORMAT_DATAVIEW •BGFFCO_FORMAT_SUSPENDEMPTYVALUES •BGFFCO_FORMAT_TEXTFORMAT •BGFFCO_FORMAT_VALUETRANSFORMLIST •BGFFCO_FORMAT_VIEWEMPTYVALUEAS •BGFFCO_FORMAT_VIEWVALUEAS |
|
BGFFCO_FORMATSETTINGS_FOOTER |
Combination of all options which refer to column footer settings. These are the following options: •BGFFCO_FORMAT_FOOTER •BGFFCO_FORMAT_FOOTERVIEW •BGFFCO_FORMAT_FOOTERVISIBLE |
|
BGFFCO_FORMATSETTINGS_GENERAL |
Combination of all options which refer to general column settings. These are the following options: •BGFFCO_FORMAT_AUTOEDIT •BGFFCO_FORMAT_EDITABLE •BGFFCO_FORMAT_EDITCLOSEFLAGS •BGFFCO_FORMAT_EDITSTARTFLAGS •BGFFCO_FORMAT_FIELDSPEC •BGFFCO_FORMAT_HEIGHTVARIABLE •BGFFCO_FORMAT_MOVABLE •BGFFCO_FORMAT_RESIZABLE •BGFFCO_FORMAT_SELECTABLE •BGFFCO_FORMAT_TOOLTIPTEXT •BGFFCO_FORMAT_WIDTH •BGFFCO_FORMAT_WIDTHMAX •BGFFCO_FORMAT_WIDTHMIN |
Data Type: | DWord |
<auColumn> | Array with the columns for which the settings are to be determined. A column can either be specifed by its name (string or symbol) or by the column object. The argument is only consider if neither of the two options BGFFCO_ALLCOLUMNS or BGFFCO_OPENCOLUMNS is defined. |
Data Type: | Array |
Return Value
auFormat | Array with the determined settings for the columns. Every array item contains an sub array with two items. The first item is the name of the column. The second item is an object of the class bNameArray and contains the determined settings for the column. |
Data Type: | Array |
Description
bBrowser:GetFormatFromColumns() determines various settings from columns in the browser. For each column one or more settings can be determined.
Remarks
With the method all important settings of the open columns can be determined in order to save it and recover it when the browser is open again. The return value of the method can be passed to method bBrowser:FormatColumns().
Samples
In the following sample various settings of all supported columns from a bBrowser are determined and converted into a string. This string could be saved into a file to restore it at a later time.
LOCAL cSettings AS STRING
LOCAL iOptions AS DWORD
LOCAL auSettings AS ARRAY
LOCAL onaFormat AS bNameArray
LOCAL iColPos AS DWORD
LOCAL iColCount AS DWORD
LOCAL iPos, iCount AS DWORD
iOptions := _Or(BGFFCO_ALLCOLUMNS,;
BGFFCO_FORMAT_EDITABLE,;
BGFFCO_FORMAT_EDITCLOSEFLAGS,;
BGFFCO_FORMAT_EDITSTARTFLAGS,;
BGFFCO_FORMAT_WIDTH,;
BGFFCO_FORMAT_WIDTHMAX,;
BGFFCO_FORMAT_WIDTHMIN)
auSettings := oBrowser:GetFormatFromColumns(iOptions)
cSettings := ""
iColCount := ALen(auSettings)
FOR iColPos := 1 upto iColCount
cSettings += "Name=" + Symbol2String(auSettings[iColPos, 1])
onaFormat := auSettings[iColPos, 2]
iCount := onaFormat:Count
FOR iPos := 1 upto iCount
cSettings += "," + Symbol2String(onaFormat:GetName(iPos)) + "=" + AsString(onaFormat:Get(iPos))
NEXT
cSettings += CRLF
NEXT
See Also
Page url: http://www.YOURSERVER.com/index.html?bbrowser_getformatfromcolumns.htm