Navigation:  Classes > bRecordGroup >

bRecordGroup:CollapseItems()

Print this Topic    Previous pageReturn to chapter overviewNext page

Purpose

Collapse one or all expanded record group items.

Class

bRecordGroup

Type

Method

Syntax

<oRecordGroup>:CollapseItems(

<iOptions>,

[<auItem>]

) Æ lSuccess

Arguments

<iOptions>The options that are to be used when collapsing the record group items. The following values are supported:

 

Option

Description

BRGCIO_NONE

No options are defined.

BRGCIO_COLLAPSEALL

Collapse all record group items. The Argument auItem is not to be used.

BRGCIO_ITEM

The argument auItem contains objects of the class bRecordGroupItem.

BRGCIO_RECNO

The argument auItem contains the record numbers of the record group items.

BRGCIO_REGARDSUBITEMS

If a record group item contains sub items, then these are also collapsed.

 

Data Type:DWord

 

<auItem>List of the record group items which are to be collapsed. The list can contain either objects of the class bRecordGroupItem or the record numbers of the record group items.
Data Type:Array

Return Value

lSuccessA logical value that indicates whether the record group items could be collapsed.
TRUEThe record group items were collapsed.
FALSEThe record group items could not be collapsed.
Data Type:Logic

Description

bRecordGroup:CollapseItems() collapse one or all open record group items.

 

Notes

With the option BRGCIO_COLLAPSEALL only these record group items are collapsed which are already determined. So that the record group items are also collapsed automatically which were not determined yet, the option BRGLO_AUTOOPEN must be removed in all record group levels in addition.

Samples

In the sample below all expanded record group items in a bBrowser are collapsed.

 

// Collapse all already expanded record group items
oBrowser:RecordGroup:CollapseItems(BRGCIO_COLLAPSEALL)
 
// Remove the option BRGLO_AUTOOPEN in all record group levels so that the 
// record group items still to be determined are displayed collapsed.
iCount := oBrowser:RecordGroup:LevelList:Count
for iPos := 1 upto iCount
  oRecordGroupLevel := oBrowser:RecordGroup:LevelList:Get(iPos)
  oRecordGroupLevel:Options := _And(oRecordGroupLevel:Options, _Not(BRGLO_AUTOOPEN))
next

 

// Refresh the bBrowser

oBrowser:Refresh()

See Also

bRecordGroup:LevelList

bRecordGroupItem

bRecordGroupLevel:Options

 


Page url: http://www.YOURSERVER.com/index.html?brecordgroup_collapseitems.htm