Purpose
Enable or disable sort marker in column captions.
Class
Type
Method
Syntax
<oBrowser>:EnableCaptionSortMarker([<lEnable>]) Æ NIL
Arguments
<lEnable> | A logical value that indicates whether sort marker can be shown in column captions. If this argument is not specified, the value TRUE is used as default. |
Data Type: | Logic |
Description
bBrowser:EnableCaptionSortMarker() enables or disables the support of sort marker in column captions. With the access bBrowserColumn:CaptionSortMarker a sort marker can be defined.
The sort markers are shown on the top border within the column caption. So that sufficient space for the sort marker is on the top border either the automatic calculation of the height of column captions can be switched on with the access bBrowser:AutoCaptionHeight or the height of the column captions must be adjusted with the access bBrowser:CaptionHeight. In addition, the inner space between top border and the caption value must be adjusted with the access bBrowser:CaptionView:Grid:InnerSpace. How many pixel the inner space must be adjusted can be determined with the method bBrowser:PropertyGet() and the property #SortMarkerHeight.
Remarks
Using the method bBrowser:IsCaptionSortMarker() the setting can be queried at any time.
After creating a bBrowser control the sort marker in column captions is disabled as default.
Samples
In the sample below a bBrowser control is created, the sort markers are enabled and for column #LASTNAME a sort marker is defined. The height of the column captions is adjusted automatically with the access bBrowser:AutoCaptionHeight.
LOCAL odbsCUSTOMER AS DBServer
LOCAL oBrowser AS bBrowser
LOCAL oColumn AS bDataColumn
// Create a bBrowser
odbsCUSTOMER := DBServer{"CUSTOMER"}
odbsCUSTOMER:SetOrder("NAME")
oBrowser := bBrowser{oOwner,;
1000,;
Point{0, 0},;
Dimension{300, 250}}
// Enable sort markers
oBrowser:AutoCaptionHeight := TRUE
oBrowser:EnableCaptionSortMarker(TRUE)
// Set server in bBrowser and show it
oBrowser:Use(odbsCUSTOMER)
oBrowser:Show()
// Define sort marker in column LASTNAME
oColumn := oBrowser:GetColumn(#LASTNAME)
oColumn:CaptionSortMarker := BDCF_SORTMARKER_UP
// Importand!!!
// -> Redraw bBrowser
oBrowser:Redraw(#CAPTION)
In the sample below a bBrowser control is created, the sort markers are enabled and for column #LASTNAME a sort marker is defined. The height of the column captions is adjusted manual.
LOCAL odbsCUSTOMER AS DBServer
LOCAL oBrowser AS bBrowser
LOCAL oColumn AS bDataColumn
// Create a bBrowser
odbsCUSTOMER := DBServer{"CUSTOMER"}
odbsCUSTOMER:SetOrder("NAME")
oBrowser := bBrowser{oOwner,;
1000,;
Point{0, 0},;
Dimension{300, 250}}
// Enable sort markers
oBrowser:EnableCaptionSortMarker(TRUE)
oBrowser:CaptionView:Grid:SpaceTop := oBrowser:PropertyGet(#SortMarkerHeight)
oBrowser:CaptionHeight += oBrowser:PropertyGet(#SortMarkerHeight)
oBrowser:Recalculate()
// Set server in bBrowser and show it
oBrowser:Use(odbsCUSTOMER)
oBrowser:Show()
// Define sort marker in column LASTNAME
oColumn := oBrowser:GetColumn(#LASTNAME)
oColumn:CaptionSortMarker := BDCF_SORTMARKER_UP
// Importand!!!
// -> Redraw bBrowser
oBrowser:Redraw(#CAPTION)
See Also
bBrowser:IsCaptionSortMarker()
bBrowserColumn:CaptionSortMarker
Page url: http://www.YOURSERVER.com/index.html?bbrowser_enablecaptionsortmarker.htm