Rx Draw Grid

RX Library

Control Name Unit Class
RX Draw Grid RxCtrls TRxDrawGrid

Description:
Rx Draw is an draw grid. It allows more complex plug-ins to be activated.


Event OnAcceptEditKey
Declaration: OnAcceptEditKey: TAcceptKeyEvent;

The OnAcceptEditKey event occurs when a user presses a single character key in the in-place editor. OnAcceptEditKey provides a simple screening of keyboard input while the user is editing the contents of a cell. Write an OnAcceptEditKey event handler to take specific action whenever a user presses a character key and to determine whether keys typed by the user are valid for the current grid cell. OnAcceptEditKey does not occur unless the Options property includes goEditing.


Event OnCancelEdit
Declaration: OnCancelEdit: TNotifyEvent;

OnCancelEdit occurs whenever the in-place editor requests to cancel changes to the current cell. This event is called when user press "Escape" key in in-place editor.


Event OnColumnSized
Declaration: OnColumnSized: TNotifyEvent;

OnColumnSized occurs immediately after the width of a column changes. Write an OnColumnSized event handler to provide special processing whenever a column in the grid changes width. Columns can be sized programmatically or by user manipulation. OnColumnSized does not occur unless the Options property includes goColSizing.


Event OnEditButtonClick
Declaration: OnEditButtonClick: TNotifyEvent;

OnEditButtonClick occurs when the user presses the ellipsis button in a grid cell. Write an OnEditButtonClick event handler to bring up an appropriate list or dialog when the user presses the ellipsis button in a grid cell. The OnEditButtonClick event handler can set the value assotiated with the cell based on the user response to the list or dialog. Use Col and Row properties to access the data assotiated with the current grid cell.


Event OnEditChange
Declaration: OnEditChange: TNotifyEvent;

OnEditChange occurs whenever the text for the in-place editor in TRxDrawGrid component may have changed. Write an OnEditChange event handler to take specific action whenever the text for the in-place editor may have changed. This event provides the first opportunity to respond to modifications that the user types into the in-place editor.


Event OnGetEditAlign
Declaration: OnGetEditAlign: TEditAlignEvent;

OnGetEditAlign occurs when the in-place editor requests an edit alignment. Write an OnGetEditAlign event handler to provide the in-place editor with an alignment that describes the way the text is formatted by the in-place editor. Set the Alignment parameter to the value that describes the edit alignment for the cell specified by the ACol and ARow parameters. OnGetEditAlign does not occur unless the Options property includes goEditing.


Event OnGetEditLimit
Declaration: OnGetEditLimit: TEditLimitEvent;

OnGetEditLimit occurs when the in-place editor requests the number of characters that can be typed into cells. Write an OnGetEditLimit event handler to determine if a limit should be placed on the number of characters a user can type into a cell. Set the MaxLength parameter to the value that describes the number of characters that can be typed into cells. A value of 0 indicates that there is no application-defined limit on the length. OnGetEditLimit does not occur unless the Options property includes goEditing.


Event OnGetEditStyle
Declaration: OnGetEditStyle: TEditStyleEvent;

OnGetEditStyle occurs when the in-place editor requests an edit style. The Style parameter determines how users can edit the data of a grid cell. These are the possible values of Style:

  • ieSimple - No combo box or ellipsis button is provided. The user cannot select the cell's content from a list.
  • iePicklist - The grid displays a combo box in the column, and the user can choose a value from the drop-down list. You must specify contents of a pick-list by handling OnGetPicklist event.
  • ieEllipsis - The column displays an ellipsis button that the user can click to choose a value. Clicking the ellipsis button triggers an OnEditButtonClick event.

OnGetEditStyle does not occur unless the Options property includes goEditing.


Event OnGetPicklist
Declaration: OnGetPicklist: TPicklistEvent;

OnGetPicklist occurs when the in-place editor requests a pick-list for its drop-down control. You must fill contents of string-list specified by PickList parameter by adding lines (and possible objects) to the string-list. OnGetPicklist does not occur unless the Options property includes goEditing and your custom OnGetEditStyle event handler set Style parameter to iePicklist.


Event OnRowSized
Declaration: OnRowSized: TNotifyEvent;

OnRowSized occurs immediately after the height of a row changes. Write an OnRowSized event handler to provide special processing whenever a row in the grid changes height. Rows can be sized programmatically or by user manipulation. OnRowSized does not occur unless the Options property includes goRowSizing.


Event OnShowEditor
Declaration: OnShowEditor: TEditShowEvent;

OnShowEditor occurs before creating the editor for a cell. Write an OnShowEditor event handler to indicate whether the in-place edit control can be created to allow editing. An OnEditShow event handler contains a boolean AllowEdit variable that determines whether a cell is allowed to editing. Its default value is True.


Method DrawMasked
Declaration: procedure DrawMasked(ARect: TRect; Graphic: TBitmap);

This draws an edit mask, or mask around the selected region.


Method DrawMultiline
Declaration: procedure DrawMultiline(ARect: TRect; const S: string; Align: TAlignment);

DrawMultiline draws a string inside the grid's cell specified by the ACol and ARow parameters. The string will be written using the current value of Font property. Align parameter specifies how text is aligned within the cell. Lines are automatically broken between words if a word would extend past the edge of the cell's rectangle. You can use this method in your custom OnDrawCell event handler.


Method DrawPicture
Declaration:

procedure DrawPicture(ARect: TRect; Graphic: TGraphic);

This method draws a picture in the selected region.


Method DrawStr
Declaration:
procedure DrawStr(ARect: TRect; const S: string; Align: TAlignment);

DrawStr draws a string inside the grid's cell specified by the ACol and ARow parameters. The string will be written using the current value of Font property. Align parameter specifies how text is aligned within the cell. DrawStr displays text on a single line only. To display multiline text in a grid's cell use DrawMultiline method.You can use this method in your custom OnDrawCell event handler.


Method InvalidateCell
Declaration: procedure InvalidateCell(ACol, ARow: Longint);

The InvalidateCell method causes the visible portion of a grid cell to repaint. Nothing is repainted if the cell is not visible on screen. The ACol and ARow parameters specify the column and row of the cell.


Method InvalidateRow
Declaration: procedure InvalidateRow(ARow: Longint);

InvalidateRow invalidates the region occupied by a row so that it will be repainted with the next Windows paint message. Call InvalidateRow when a row changes so that the area it occupies will need to be repainted. The ARow parameter is the row index.


Index Page | About | Download
Creation Date: 4 Feb 1998 | Last Update: 16 Mar 2000