   TOutlineBrowser Component

Properties	Methods

Unit

OlBrowse

Description

This component allows users to browse hierarchical tables and queries on both enterprise databases (such as Oracle, Interbase), as well as tables that are files (such as Paradox). The user is able to browse from the top level (root), to the lowest level by opening the relevant branches. This component handles tables with multi-field keys (See the SetSelectedPK and GetSelectedPK methods). Only nodes seen are actually loaded. This browser can handle large tables as long as the number of nodes displayed is not greater than the memory available, or greater than 32K.

Specify the datasource that will provide the data for the lookup browser by using the LookupSource Property. Note that the LookupSource must be connected to either a Query or a Table. If the table is a file (such as Paradox), the key fields must be of type string. Note that this component will not work for queries on tables that are files.

The LookupField property defines which field is displayed in the browser (by default). The user can change this field to any visible field in the dataset by selecting it from the combo box. The DisplayField property defines the field that is displayed in the edit box when the user selects an item in the browser.

Use the StdParentChildJoins property to define the relationship between records and the parent of the record. The child defined is referred to as the Primary Key, and the Parent is referred to as the Parent Key.

The RootCondition property defines the condition that results in the top level being selected.

If the user clicks the right mouse button over a node in the outline, then a popup window displays all visible fields of the selected node and their values. The RtClickDetails property indicates if this feature is enabled or not.

The structure can be changed by dragging and dropping. The underlying tables are updated automatically. The CanUpdate property indicates if this feature is enabled or not.

If the user has types some text into the edit box, and then clicks the button, then the database will be searched for text containing this value in the LookupField. Only the relevant branches are opened and the item selected. The SearchEnabled property indicates whether this feature is enabled or not.

The button can be customised by using the BtnCaption, BtnGlyph and NumGlyphs properties.

Before using this component, you need to define fields for the dataset. To do this, right click your mouse over the table or query, then select Fields Editor. Next, select Add and then add the fields that you would like to include in the browser. Be sure to include the fields that are part of the joins. Fields that are not to be displayed in the browser but are required for joins can be removed by setting the visible property of these fields to false. Set the displayText property of these fields to provide meaningful descriptions of the fields to the user.

In addition to these properties, methods, and events, this component also has the properties, methods, and events that apply to the TEdit Component.

Note: The author is available for employment, see About TOutlineBrowser


Properties

About

BtnCaption

BtnGlyph

BtnHint

CanUpdate

DialogCaption

DisplayField

LookupField

LookupSource

NumGlyphs

RootCondition

RtClickDetails

SearchEnabled

StdParentChildJoins


About TOutlineBrowser Property
About Property

See Also

Applies to

TOutlineBrowser

Declaration

property About: TAbout

Description

This property does not set any attributes of the component, it simply indicates the author, copyright, and version details.


See Also

About TOutlineBrowser


About TOutlineBrowser

See Also

TOutlineBrowser was written by John Stathakis (e-mail: JLSTATH@MAIL.ICON.CO.ZA)

Version: 1.00

1996, John Stathakis

You may use this product freely, however, the source code and related documentation may not be changed in any way without the written permission of the author. Please note that the author will not accept responsibility for any loss resulting from the use of this or any other component. Any code you may receive may not be distributed in any form without written permission from the author.

Please contact me if you have any enquiries or bug reports.

Note: The author is currently available for employment. Please forward enquiries in this regard to the above e-mail address. Preferred destinations in the following order: Australia, United States, United Kingdom. Other destinations will be considered.


See Also

About TOutlineBrowser Property


LookupSource Property

See Also

Applies to

TOutlineBrowser, TLookupOutline

Declaration

property LookupSource: TDataSource

Description

The LookupSource property determines where the component obtains the data to display in the outline browser. Specify the data source component that identifies the dataset the data for the browser is found in.

Note that if the dataset is a query, then it must be in the following form:

Select <Fields> from <Tables> where <where condition> order by <fields>

note that the where and order by clauses are optional.


See Also

StdParentChildJoins Property

TOutlineDataLink Type

RootCondition Property

LookUpField Property

DisplayField Property

SetSelectedPK Method

GetSelectedPK Method


StdParentChildJoins Property

See Also

Applies to

TOutlineBrowser, TLookupOutline

Declaration

property StdParentChildJoins: TOutlineDataLink

Description

This property indicates the parent-child relationship in the hierarchical table defined by the datasource selected for the LookupSource property. In order to set this property, you first need to define fields for the dataset. To do this, right click your mouse over the table or query, then select Fields Editor. Next, select Add and then add the fields that you would like to include in the browser. Be sure to include the fields that are part of the joins.


See Also

TOutlineDataLink Type

RootCondition Property

LookupSource Property

LookUpField Property

DisplayField Property

SetSelectedPK Method

GetSelectedPK Method


TOutlineDataLink Type

See Also

This object is derived from TFieldDataLink, with the addition of properties containing the details of the joins.


See Also

StdParentChildJoins Property

RootCondition Property

LookupSource Property

LookUpField Property

DisplayField Property

SetSelectedPK Method

GetSelectedPK Method


BtnCaption Property

See Also

Applies to

TOutlineBrowser, TLookupOutline

Declaration

property BtnCaption: string

Description

Describes the caption that is on the button.


See Also

BtnGlyph Property

NumGlyphs Property

ButtonClick Method

BtnHint Property

DialogCaption Property


BtnGlyph Property

See Also

Applies to

TOutlineBrowser, TLookupOutline

Declaration

property BtnGlyph: TBitmap

Description

Describes the graphic that is on the button.


See Also

BtnCaption Property

NumGlyphs Property

ButtonClick Method

BtnHint Property

DialogCaption Property


BtnHint Property

See Also

Applies to

TOutlineBrowser, TLookupOutline

Declaration

property BtnHint: string

Description

Describes the hint for the button. An empty string results in no hint.


See Also

BtnCaption Property

NumGlyphs Property

ButtonClick Method

BtnGlyph Property

DialogCaption Property


NumGlyphs Property

See Also

Applies to

TOutlineBrowser, TLookupOutline

Declaration

property NumGlyphs: TNumGlyphs

Description

Indicates the number of images that are in the graphic specified by the BtnGlyph property. See NumGlyphs in the Delphi help for more details


See Also

BtnCaption Property

BtnGlyph Property

ButtonClick Method

BtnHint Property

DialogCaption Property


DialogCaption Property

See Also

Applies to

TOutlineBrowser, TLookupOutline

Declaration

property DialogCaption: string

Description

Indicates the caption that appears on the outline dialog.


See Also

NumGlyphs Property

BtnCaption Property

BtnGlyph Property

ButtonClick Method

BtnHint Property


RootCondition Property

See Also

Applies to

TOutlineBrowser, TLookupOutline

Declaration

property RootCondition: String

Description

Sets the condition required which, when applied as an extra condition to the table or query that is linked to the LookupSource property, returns the top level of the items in the browser.

Example

Persons_Boss is null and not Person_Type = Freelance


See Also

StdParentChildJoins Property

TOutlineDataLink Type

LookupSource Property

LookUpField Property

DisplayField Property

SetSelectedPK Method

GetSelectedPK Method


LookupField Property

See Also

Applies to

TOutlineBrowser, TLookupOutline

Declaration

property LookupField: String

Description

Defines the field that the browser displays as a default. All visible fields are included in the display combo allowing the user to view the browser hierarchy in any of them.


See Also

StdParentChildJoins Property

TOutlineDataLink Type

RootCondition Property

LookupSource Property

DisplayField Property

SetSelectedPK Method

GetSelectedPK Method


DisplayField Property

See Also

Applies to

TOutlineBrowser, TLookupOutline

Declaration

property DisplayField: String

Description

Defines the field that is displayed in the edit control when the user selects an item and then exits from the dialog. In the data aware version of this component (TLookupOutline), this is the field of the dataset linked to the LookupSource, that describes the record currently joined to the DataSource defined by the DataSource property.

This allows the links between the two tables/queries to involve the keys only whilst a description (or some other field) is displayed in the edit part of the control.


See Also

StdParentChildJoins Property

TOutlineDataLink Type

RootCondition Property

LookupSource Property

LookUpField Property

SetSelectedPK Method

GetSelectedPK Method


CanUpdate Property

Applies to

TOutlineBrowser, TLookupOutline

Declaration

property CanUpdate: Boolean

Description

Indicates if the user can update the structure by dragging items to new positions in the structure. The underlying database tables are automatically updated. Note that if the LookupSource points to a dataset that is a query, then the query should have all conditions necessary for a live dataset.


RtClickDetails Property

Applies to

TOutlineBrowser, TLookupOutline

Declaration

property RtClickDetails: Boolean

Description

Indicates if the user can see the details of a record by right clicking over the node representing that record. The field display label is shown with the values of the fields displayed next to it.


SearchEnabled Property

Applies to

TOutlineBrowser, TLookupOutline

Declaration

property SearchEnabled: Boolean

Description

If true, than when the user types in text and presses the button, then the browser will locate the record containing the text typed. The LookupField is searched, then when found, that item is selected in the browser.


Methods

ButtonClick

SetSelectedPK

GetSelectedPK


ButtonClick Method

See Also

Applies to

TOutlineBrowser, TLookupOutline

Declaration

procedure ButtonClick(Sender: TObject); virtual;

Description

Simulates a button click. Called when the button is clicked.


See Also

BtnCaption Property

BtnGlyph Property

NumGlyphs Property


SetSelectedPK Method

See Also

Applies to

TOutlineBrowser, TLookupOutline

Declaration

Procedure SetSelectedPK(SelPK: TStringList);

Description

When the user selects a node in the browser, the DisplayField and primary key of the selected node are passed back to the control. If you set the key, then when the user presses the browse button, the browser moves to the node defined by the SelectedPK (unless the user has typed in text, and SearchEnabled is true).

The order of the PK is the same as the child join defined in the StdParentChildJoins property


See Also

StdParentChildJoins Property

TOutlineDataLink Type

RootCondition Property

LookupSource Property

LookUpField Property

DisplayField Property

GetSelectedPK Method


GetSelectedPK Method

See Also

Applies to

TOutlineBrowser, TLookupOutline

Declaration

function GetSelectedPK: TStringList

Description

When the user selects a node in the browser, the DisplayField and primary key of the selected node are passed back to the control. Use the GetSelectedPK method to access the Primary Key of the selected node.

The order of the PK is the same as the child join defined in the StdParentChildJoins property


See Also

StdParentChildJoins Property

TOutlineDataLink Type

RootCondition Property

LookupSource Property

LookUpField Property

DisplayField Property

SetSelectedPK Method


   TLookupOutline Component

Properties

Unit

OlBrowse

Description

This component is a data aware version of the TOutlineBrowser component. In addition to the multi-field key feature of TOutlineBrowser, TLookupOutline supports multi field joins between the LookupSource and the DataSource for the component. At the same time, the edit box displays a descriptive field (defined by DisplayField) from the LookupSource which represents the join between the two tables.

Use the ForeignJoins property to define the joins between the dataset linked to the LookupSource and the dataset linked to the DataSource Property.

In addition to these properties, methods, and events, this component also has the properties, methods, and events that apply to the TOutlineBrowser Component.

Note: The author is available for employment, see About TLookupOutline


Properties

About

DataSource

ForeignJoins


About TLookupOutline Property
About Property

See Also

Applies to

TLookupOutline

Declaration

property About: TAbout

Description

This property does not set any attributes of the component, it simply indicates the author, copyright, and version details.


See Also

About TLookupOutline


About TLookupOutline

See Also

TLookupOutline was written by John Stathakis (e-mail: JLSTATH@MAIL.ICON.CO.ZA)

Version: 1.00

1996, John Stathakis

You may use this product freely, however, the source code and related documentation may not be changed in any way without the written permission of the author. Please note that the author will not accept responsibility for any loss resulting from the use of this or any other component. Any code you may receive may not be distributed in any form without written permission from the author.

Please contact me if you have any enquiries or bug reports.

Note: The author is currently available for employment. Please forward enquiries in this regard to the above e-mail address. Preferred destinations in the following order: Australia, United States, United Kingdom. Other destinations will be considered.


See Also

About TLookupOutline Property


DataSource Property

See Also

Declaration

property DataSource: TDataSource

Description

Defines the DataSource that is connected to the dataset that is updated when the user selects an item from the browser. See DataSource in the Delphi help for more details. The fields that are updates is defined by the ForeignJoins Property


See Also

ForeignJoins Property

StdParentChildJoins Property

TOutlineDataLink Type

RootCondition Property

LookupSource Property

LookUpField Property

DisplayField Property

SetSelectedPK Method


ForeignJoins Property

See Also

Declaration

property ForeignJoins: TOutlineDataLink

Description

This property indicates the relationship between the datasource selected for the LookupSource property and the dataset that is updated by the selection in the browser. In order to set this property, you first need to define fields for both datasets. To do this, right click your mouse over the table or query, then select Fields Editor. Next, select Add and then add the required fields. Be sure to include the fields that are part of the joins.


See Also

DataSource Property

StdParentChildJoins Property

TOutlineDataLink Type

RootCondition Property

LookupSource Property

LookUpField Property

DisplayField Property

SetSelectedPK Method