Class TfrmRearrangeObjects

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type TfrmRearrangeObjects = class(TfrmCustomGoPhast)

Description

TfrmRearrangeObjects is used to change the order of TScreenObjects. The user can also rename them in TfrmRearrangeObjects.

Hierarchy

Overview

Fields

Implicit btnCancel: TBitBtn;
Implicit btnHelp: TBitBtn;
Implicit btnOK: TBitBtn;
Implicit lblInstructions: TLabel;
Implicit pnlBottom: TPanel;
Implicit pnlInstructions: TPanel;
Implicit sgObjects: TStringGrid;
Implicit rgShow: TRadioGroup;
Private FDraggingRows: boolean;

Methods

Implicit procedure btnOKClick(Sender: TObject);
Implicit procedure FormCreate(Sender: TObject); override;
Implicit procedure sgObjectsDrawCell(Sender: TObject; ACol, ARow: Integer; Rect: TRect; State: TGridDrawState);
Implicit procedure sgObjectsMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
Implicit procedure sgObjectsMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
Implicit procedure sgObjectsMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
Implicit procedure sgObjectsSelectCell(Sender: TObject; ACol, ARow: Integer; var CanSelect: Boolean);
Implicit procedure rgShowClick(Sender: TObject);
Private procedure GetData;
Private procedure SetCursor(const ACol, ARow: integer);
Private procedure SetData;

Description

Fields

Implicit btnCancel: TBitBtn;

Clicking btnCancel closes the TfrmRearrangeObjects without doing anything.

Implicit btnHelp: TBitBtn;

Clicking btnHelp displays help on the TfrmRearrangeObjects.

Implicit btnOK: TBitBtn;

See btnOKClick.

Implicit lblInstructions: TLabel;

lblInstructions displays text that tells how to use TfrmRearrangeObjects.

Implicit pnlBottom: TPanel;

pnlBottom holds the buttons at the bottom of TfrmRearrangeObjects.

Implicit pnlInstructions: TPanel;

pnlInstructions holds lblInstructions at the top of TfrmRearrangeObjects.

Implicit sgObjects: TStringGrid;

sgObjects lists the TScreenObjects.

Implicit rgShow: TRadioGroup;

rgShow is used to determine whether, all, the visible, or the selected objects are listed.

Private FDraggingRows: boolean;

FDraggingRows is set to true in sgObjectsMouseDown to indicate that the user is dragging a row to a new position.

Methods

Implicit procedure btnOKClick(Sender: TObject);

btnOKClick calls SetData.

Implicit procedure FormCreate(Sender: TObject); override;

FormCreate initializes TfrmRearrangeObjects and calls GetData.

Implicit procedure sgObjectsDrawCell(Sender: TObject; ACol, ARow: Integer; Rect: TRect; State: TGridDrawState);

sgObjectsDrawCell draws the selected TScreenObjects with a bold font.

Implicit procedure sgObjectsMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);

sgObjectsMouseDown changes the cursor to give a visual indication that a row is being dragged.

Implicit procedure sgObjectsMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);

sgObjectsMouseMove changes the cursor to give a visual indication that a row is being dragged.

Implicit procedure sgObjectsMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);

sgObjectsMouseUp changes the cursor to give a visual indication that a row is no longer being dragged.

Implicit procedure sgObjectsSelectCell(Sender: TObject; ACol, ARow: Integer; var CanSelect: Boolean);

This prevents the user from renaming deleted TScreenObjects.

Implicit procedure rgShowClick(Sender: TObject);
 
Private procedure GetData;

GetData retrieves the TScreenObjects and displays them in sgObjects. If a TScreenObject has been deleted, the height of its cell will be zero.

Private procedure SetCursor(const ACol, ARow: integer);

If the cursor is over the left hand column, the user can drag the rows to rearrange the objects. Use crHandGrab to indicate that the rows are being rearranged or crHandFlat to indicate that they can be moved. Otherwise, just use the arrow cursor.

Private procedure SetData;

SetData sets the new order of the TScreenObjects. The user can also rename TScreenObjects.


Generated by PasDoc 0.12.1 on 2013-05-13 15:41:39