Navigation:  Classes > bBrowser >

bBrowser:SetInfo()

Print this Topic    Previous pageReturn to chapter overviewNext page

Purpose

Sets for a certain state of the bBrowser a text, icon, bitmap or bCompoundValue as info an value.

Class

bBrowser

Type

Method

Syntax

<oBrowser>:SetInfo(

<iInfoState>,

<uInfo>

) Æ lSuccess

Arguments

<iInfoState>The state for which an info value is to be set. The following table lists the supported states:

 

State

Description

BINFO_NOSERVER

The browser is not linked to a data server.

BINFO_SERVERNOTUSED

The data server that is linked with the browser is not opened.

BINFO_NORECORDS

The data server that is linked to the browser does not contain records. This state also arises, for example, if a filter or selective relation hides all records.

Data type:Integer

 

<uInfo>The info value that is to be set for the chosen state.
Data type:String | Icon | Bitmap | bCompundValue

Return Value

lSuccessA logical value that indicates whether the info value could be set.
TRUEThe info value could be set.
FALSEThe info value could not be set.
Data type:Logic

Description

In the bBrowser there are several states in which the bBrowser cannot show data. Such a state can occur for example if in the linked data server a filter condition is set for which no records exists. In this case an info value as text, icon, bitmap or bCompoundValue can be shown in the bBrowser.

 

InfoText

 

With the access bBrowser:InfoView the view of the info value can be formatted. For example it can define fonts, foreground and background colors.

 

So that the set info value is also shown in the browser it must be redrawn with the method bBrowser:Redraw().

Samples

In the following sample for all supported states the info values are set.

 

// open data server

odbsCUSTOMER := DBServer{"CUSTOMER"}

IF odbsCUSTOMER:Used

       // create browser

       oBrowser := bBrowser{oOwner,;

                                                       1000,;

                                                       Point{0, 0},;

                                                       Dimension{300, 250}}

 

         // set view style for info values

       oBrowser:InfoView:Grid := bGrid{BGRID_NONE, 4, 8, 4, 8}

       oBrowser:InfoView:Foreground := Color{COLORWHITE}

       oBrowser:InfoView:Background := Brush{Color{COLORBLUE}}

 

       // set text as info values

       oBrowser:SetInfo(BINFO_NOSERVER, "No server is set.")

       oBrowser:SetInfo(BINFO_SERVERNOTUSED, "Server is not open.")

       oBrowser:SetInfo(BINFO_NORECORDS, "There are no records in the choice.")

 

         // link data server to browser and show browser

       oBrowser:Use(odbsCUSTOMER)

       oBrowser:Show()

ENDIF

See Also

bBrowser:DrawInfo()

bBrowser:GetInfo()

bBrowser:InfoView

bBrowser:IsInfoVisible()

bBrowser:SetInfoHeight()

bBrowser:SetInfoView()

 


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