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.19
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 propertyContextMenu
A menu object representing the local pop-up menu for a control.
(Inherited from Control.)
Public propertyControlID
A number between 1 and 8000 representing the unique ID of a control
(Inherited from Control.)
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 propertyFieldSpec
The field specification connected to the control.
(Inherited from Control.)
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 propertyHyperLabel
The hyperlabel connected to the control.
(Inherited from Control.)
Public propertyModified
A logical value that is set to TRUE when a standard edit control or editable combo box is in the process of being modified.
(Inherited from Control.)
Public propertyName
A string representing the name of the control.
(Inherited from Control.)
Public propertyNameSym
A symbol representing the name of the control.
(Inherited from Control.)
Public propertyOrigin
A point representing the location of a control on its owner window, in canvas coordinates.
(Inherited from Control.)
Public propertyOwner
The owner window of the data browser.
(Overrides Owner.)
Public propertyOwnerAlignment
Constant representing how the window will be aligned within its owner window.
(Inherited from Control.)
Public propertyPointer
The Pointer object to be used in the text area of the data browser.
Public propertyReadOnly
Is the control readonly ?
(Inherited from Control.)
Public propertyRowCount
A numeric value indicating the number of rows in the data browser.
Public propertyServer
The server object that currently connected to this control. If no server is connected, the value is NIL.
(Inherited from Control.)
Public propertySize
A dimension representing the size of a control.
(Inherited from Control.)
Public propertyStatus
A hyperlabel indicating the status of the control after a validation attempt or other action.
(Inherited from Control.)
Public propertyTextColor
The text color to be used for the text area of the data browser.
Public propertyCode exampleTextValue
A string representing the value held in the control.
(Inherited from Control.)
Public propertyToolTipText
String value representing the tooltip text used when the user moves the mouse pointer over the control.
(Inherited from Control.)
Public propertyUseHLForToolTip
Logical value determining whether the descriptive text of a control's Hyperlabel should be used as the tooltip text.
(Inherited from Control.)
Public propertyCode exampleValue
The value held in the control, in whatever data type the control holds.
(Inherited from Control.)
Public propertyValueChanged
A logical value representing whether the control's Value has been changed from its prior setting.
(Inherited from Control.)
Top
Methods
  NameDescription
Public methodActivate
Provide a method that is invoked when the control has focus and a window is activated.

(Inherited from Control.)
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 methodCreate
Creates the underlying Win32 control
(Inherited from Control.)
Public methodCut
Cut the current selection in the data browser to the clipboard.
Public methodDeactivate
Provide a method that is invoked when the control has focus and a window is deactivated.

(Inherited from Control.)
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 methodDisable
Disable a control (until a subsequent call to Control:Enable()).
(Inherited from Control.)
Public methodDisableTheme
Disable the WinXP theme for a control.
(Inherited from Control.)
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 methodEnable
Enable a control that was previously disabled.
(Inherited from Control.)
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 methodExpose
Provide a method that is invoked when the control has focus and whenever part of the window needs repainting.

(Inherited from Control.)
Public methodFocusChange
Provide a method that is invoked when the control has focus and the input focus changes from the current control to another (or vice versa).

(Inherited from Control.)
Public methodGetColumn
Retrieve a specified column in this data browser.
Public methodGetExStyle
Retrieve the Ex styles for the control.
(Inherited from Control.)
Public methodGetStyle
Retrieve the styles for the control.
(Inherited from Control.)
Public methodHandle
Return the handle for a control.
(Inherited from Control.)
Public methodHasBorder
Check if a border has been set for the control
(Inherited from Control.)
Public methodHasStyle
Check if a style value has been set for the control
(Inherited from Control.)
Public methodHide
Hide a control so it is not visible (until a subsequent call to Control:Show()).
(Inherited from Control.)
Public methodHorizontalScroll
Provide a method that is invoked when the control has focus and a horizontal scroll bar is scrolled.

(Inherited from Control.)
Public methodIsEnabled
Report if this control is currently enabled.
(Inherited from Control.)
Public methodIsExStyle
Check if a exstyle value has been set for the control
(Inherited from Control.)
Public methodIsReadOnly
Report if this control is currently readonly.
(Inherited from Control.)
Public methodIsStyle
Check if a style value has been set for the control
(Inherited from Control.)
Public methodIsVisible
Report if this control is visible (completely or partially) or hidden.
(Inherited from Control.)
Public methodKeyDown
Provide a method that is invoked when the control has focus and a key on the keyboard is pressed.

(Inherited from Control.)
Public methodKeyUp
Provide a method that is invoked when the control has focus and a key on the keyboard is released.

(Inherited from Control.)
Public methodLinkDF
Connect a control to a data field in a data server.
(Inherited from Control.)
Public methodMenuInit
Provide a method that is invoked when a pop-up menu owned by the control is about to pop up.
(Inherited from Control.)
Public methodMenuSelect
Provide a method that is invoked when an item on a menu owned by the control is highlighted.
(Inherited from Control.)
Public methodMouseButtonDoubleClick
Provide a method that is invoked when the control has focus, the mouse pointer is positioned over the window, and a mouse button is double-clicked.

(Inherited from Control.)
Public methodMouseButtonDown
Provide a method that is invoked when the control has focus, the mouse pointer is positioned over the window, and a mouse button is clicked.

(Inherited from Control.)
Public methodMouseButtonUp
Provide a method that is invoked when the control has focus, the mouse pointer is positioned over the window, and a mouse button is released.
(Inherited from Control.)
Public methodMouseDrag
Provide a method that is invoked when the control has focus and a mouse with one or more buttons clicked is moved in the window.
(Inherited from Control.)
Public methodMouseMove
Provide a method that is invoked when the control has focus and the mouse is moved in the control.
(Inherited from Control.)
Public methodMove
Provide a method that is invoked when the control has focus and the control is moved (either by the user or by the application).
(Inherited from Control.)
Public methodNotify
An event handler that reflects events that have occurred in the server connected to this data browser.
Public methodOverRide
This is a compatibility method that is no longer used or needed.
(Inherited from Control.)
Public methodPaste
Paste the current contents of the clipboard into the current data browser cell.
Public methodPerformValidations
Perform all the validations defined to this control's field specification (for example, required, maximum and minimum digits, maximum and minimum value, validation rule) and return the result of the test.
(Inherited from Control.)
Public methodRefresh
Forces the contents of the data browser to be updated from the data server.
Public methodRegisterTimer
Register a timer method to be invoked for the control.
(Inherited from Control.)
Public methodRemoveColumn
Remove a column from this data browser.
Public methodRePaint
Send an ExposeEvent to repaint the control
(Inherited from Control.)
Public methodResize
Provide a method that is invoked when the control has focus and the control changes size.
(Inherited from Control.)
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 methodSetExStyle
Set the exstyle for the control.
(Inherited from Control.)
Public methodSetFocus
Pass input focus to a control, thereby directing all mouse and keyboard input to the control.
(Inherited from Control.)
Public methodSetParent
Change the parent handle for the control.
(Inherited from Control.)
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 methodSetStyle
Set the style for the control.
(Inherited from Control.)
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 methodTimer
Provide a method to be invoked at specific intervals defined when the timer is registered though the RegisterTimer() method.
(Inherited from Control.)
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.
Public methodValidateControl
This method validates if the control has been created and when not then it triggers the control creation
(Inherited from Control.)
Public methodVerticalScroll
Provide a method that is invoked when the control has focus and a vertical scroll bar is scrolled.
(Inherited from Control.)
Top
Fields
  NameDescription
Public fieldEventReturnValue (Inherited from Control.)
Public fieldoCargo
Cargo slot.
(Inherited from VObject.)
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