Click or drag to resize

DataBrowser Class

X#
Create a data browser, which is a spreadsheet-like table for displaying information from a data server.
Inheritance Hierarchy
Object
  VObject
    Control
      DataBrowser

Namespace:  VO
Assembly:  VOGUIClasses (in VOGUIClasses.dll) Version: 2.24 GA
Syntax
 CLASS DataBrowser INHERIT Control
Request Example View Source

The DataBrowser type exposes the following members.

Constructors
  NameDescription
Public methodDataBrowser
Construct a data browser.
Top
Properties
  NameDescription
Public propertyBackground
The brush used for painting the background of this data browser.
(Overrides Background.)
Public propertyCaption
A string representing the caption of the data browser for use in its title bar.
(Overrides Caption.)
Public propertyCellEdit
Returns the edit control for the current cell when the DataBrowser is in edit mode. Otherwise a NULL_OBJECT is returned.
Public propertyColumnCount
A numeric value indicating the number of columns in the data browser.
Public propertyCurrentColumn
The current data column in the data browser (i.e., the one that contains the cursor).
Public propertyEditFont
Returns the edit font for the DataBrowser. This font can be changed with the ChangeFont() method.
Public propertyFont
The font to be used for the text area of the data browser.
Public propertyHiBackground
Returns the background brush for the Highlighted rows and cells in the Databrowser. This can be changed with the ChangeBackground() method.
Public propertyOwner
The owner window of the data browser.
(Overrides Owner.)
Public propertyPointer
The Pointer object to be used in the text area of the data browser.
Public propertyRowCount
A numeric value indicating the number of rows in the data browser.
Public propertyTextColor
The text color to be used for the text area of the data browser.
Top
Methods
  NameDescription
Public methodAddColumn
Add one or more columns to a data browser.
Public methodAsString
Return an identifying label for the data browser.
(Overrides AsString.)
Public methodCanUndo
Determine if the most recent changes to a data browser column can be undone (using DataBrowser:Undo()).
Public methodCode exampleChangeBackground
Set a new background brush for this data browser.
Public methodCode exampleChangeFont
Set a new font in a particular area of the data browser.
Public methodCode exampleChangeTextColor
Set a new pen in a particular area of the data browser.
Public methodClear
If one or more cells in the data browser are selected, clear their contents; if only some characters in a cell are selected, remove only those characters.
Public methodColPos
Return the position of the currently focused column.
Public methodCode exampleColumnFocusChange
Provide a method that is invoked when the column focus is changed.
Public methodColumnMoved
Provide a method that is invoked when a column is moved.
Public methodColumnReSize
Provide a method that is invoked when a column is resized.
Public methodCopy
Copy the current selection in the data browser to the clipboard.
Public methodCut
Cut the current selection in the data browser to the clipboard.
Public methodDEFAULT
Call the default windows procedure for a control and set the EventReturnValue.
(Overrides DEFAULT(Usual).)
Public methodDestroy
Provide a method to de-instantiate a DataBrowser object.
(Overrides Destroy.)
Public methodDispatch
Provide the prototype dispatcher for events within the system when the control has focus; routing various events to their appropriate event handlers.

(Overrides Dispatch(Usual).)
Public methodEnableBorder
Specify the border style of the data browser.
Public methodEnableColumnMove
Enable/disable whether the user can move (rearrange) columns in the data browser with the mouse. If this method is not called, the ability to move columns is enabled, by default.
Public methodEnableColumnReSize
Enable/disable whether the user can resize columns in the data browser with the mouse. If this method is not called, the ability to resize columns is enabled, by default.
Public methodCode exampleEnableColumnTitles
Turn column titles on or off for the entire browser.
Public methodEnableGrid
Enable/disable the display of a grid. If this method is not called, the grid is enabled, by default.
Public methodEnableHorizontalScroll
Enable/disable horizontal scrolling of a data browser. If this method is not called, horizontal scrolling is enabled, by default.
Public methodEnableHorizontalSplit
Enable/disable a horizontal splitbar in the data browser.
Public methodEnableVerticalScroll
Enable/disable vertical scrolling of a data browser. If this method is not called, vertical scrolling is enabled, by default.
Public methodEnableVerticalSplit
Enable/disable a vertical splitbar in the data browser.
Public methodError
Provide a method for handling error conditions raised during data browser processing.
Public methodGetColumn
Retrieve a specified column in this data browser.
Public methodNotify
An event handler that reflects events that have occurred in the server connected to this data browser.
Public methodPaste
Paste the current contents of the clipboard into the current data browser cell.
Public methodRefresh
Forces the contents of the data browser to be updated from the data server.
Public methodRemoveColumn
Remove a column from this data browser.
Public methodRestoreUpdate
Update this data browser visually and restore standard operation (after DataBrowser:SuspendUpdate() is called).
(Overrides RestoreUpdate.)
Public methodSetCaption
Set the caption for the data browser title bar.
Public methodSetColumn
Replace an existing column in the data browser with another column.
Public methodSetColumnFocus
Set the column focus to a specified data column.
Public methodSetPointer
Set a new pointer to be used when the mouse moves over a particular area of the data browser.
Public methodSetStandardStyle
Set the appearance of the data browser's caption areas.
Public methodShow
Show this data browser.
(Overrides Show.)
Public methodSuspendUpdate
Temporarily disable repainting of the data browser while data is being altered; painting resumes with a call to DataBrowser:RestoreUpdate().
(Overrides SuspendUpdate.)
Public methodUndo
Undo recent changes to a row in the data browser.
Public methodUse
Connect the data browser to a data server in a client-server relationship.
Public methodValidate
Determine whether the currently focused record is valid.
Top
Fields
  NameDescription
Public fieldptrControlDefaultProc
Top
Remarks
A data browser is a control, like a check box or edit field. However, it should ordinarily not be created as an independent control; the easiest way to use a data browser is to switch a data window to browse view. This creates the DataBrowser object; it may be referenced through the data window's Browser property. The data browser is data-aware, like a window, and may be connected to a data server as a client. It exhibits much of the same behavior as a data window: it propagates data down to the server and it responds to all the notification messages that a server sends to its clients. The easiest way to place a browser on a window as a control together with other controls is to place another data window as a nested subform; see the DataWindow class for a description. This is easily done in the Window Editor using the Edit Insert menu commands or the Auto Layout feature. See "Using the Window Editor" in your IDE User Guide for details.
Tip Tip
Static dependencies to the CATO3*.DLL files, which contain the DataBrowser and SplitWindow functionality, have been removed in this version of X#. Applications not using a data browser and/or split window no longer need these .DLLs. This leads to a smaller memory footprint, faster application startup, and smaller installations.
Data browsers present information in a spreadsheet-like table, with rows and columns. The columns are DataColumn objects. Data columns correspond to fields in a data server—each data column is linked to a server field (just like data controls on a data window). The rows correspond to records in the server. Unlike a regular data window, which displays only one record—the "current" record—at a time, the browser displays several records as rows in the table. It always maintains one row as the "current" row, which is the record the server is positioned on. References to the data and action methods that manipulate the data always refer to the "current" record, just like in a regular data window. The only difference, therefore, is visual, in that the browser shows records other than the current one. The user and the developer have a great deal of flexibility in the visual layout of data browsers. Columns can be resized and rearranged on the fly, by the user with the mouse (unless the developer disables these options) or under program control. To retain meaningful control of a column's contents after it has been rearranged, columns are identified by their name. If there is a need to use numbers for reference (as in a generic utility program that knows nothing of the meaning of its data), the columns can be referenced by their original positional number in the browser, which may or may not be the same as their visual position.
See Also

Reference