Class TrDBRecView

Unit

Declaration

type TrDBRecView = class(TCustomDrawGrid)

Description

Enhanced TCustomDrawGrid component which provides functionality for displaying and editing of one dataset record. can display all type of fields including memo and grapics fields. Each field can be displayed with diferent font style and color. Can be linked to DBGrid or to DataSource

Hierarchy

  • TCustomDrawGrid
  • TrDBRecView

Overview

Methods

Public function IsDatasetLinked: Boolean;
Public function IsActive: Boolean;
Public function GetFieldCount: integer;
Public function GetRowCount: integer;
Public function GetField(Idx: integer): TField;
Public function GetCaption(Idx: integer): string;
Public function GetValue(Idx: integer): string;
Public procedure GetFontStyle(Idx: integer; AFont: TFont; KeepFontNameSize: Boolean);
Public function GetDataAlignment(Idx: integer): integer;

Properties

Public property ScaleRatio: double read FScaleRatio;
Public property FocusedField: TField read GetFocusedField;
Public property FocusedText: string read GetFocusedText;
Public property VisibleColCount;
Public property VisibleRowCount;
Public property InplaceEditor;
Published property DataSource: TDataSource read GetDataSource write SetDataSource;
Published property DBGrid: TCustomDBGrid read FDBGrid write SetDBGrid;
Published property CustomGlyphs: TrCustomGlyphs read FCustomGlyphs write SetCustomGlyphs;
Published property OnlyVisibleField: Boolean read FOnlyVisibleField write SetOnlyVisibleField default false;
Published property OnlySimpleField: Boolean read FOnlySimpleField write SetOnlySimpleField default false;
Published property FieldsAsLink: TStringList read FFieldsAsLink write SetFieldsAsLink;
Published property TitleAlignment: TAlignment read FTitleAlignment write SetTitleAlignment default taLeftJustify;
Published property OptionsEx: TGridOptionsEx read FOptionsEx write SetOptionsEx default[];
Published property GridDlgVisibleTabs: TGridDlgVisibleTabs read FGridDlgVisibleTabs write FGridDlgVisibleTabs default[vtFieldsSetup, vtSpecFields, vtFieldsAsLink, vtPickLists, vtEllipsisFields];
Published property Fields: TStringList read FFields write SetFields;
Published property BooleanFields: TStringList read FBooleanFields write SetBooleanFields;
Published property EllipsisFields: TStrings read FEllipsisFields write SetEllipsisFields;
Published property SpecFields: TStringList read FSpecFields write SetSpecFields;
Published property SpecFont: TFont read FSpecFont write SetSpecFont;
Published property PickLists: TStringList read FPickLists write SetPickLists;
Published property DateTimePicker: TDateTimePicker read FDateTimePicker;
Published property OnLinkClick: TLinkClickEvent read FOnLinkClick write FOnLinkClick;
Published property OnGetCellParams: TGetCellParamsEvent read FOnGetCellParams write FOnGetCellParams;
Published property OnEditButtonClick: TNotifyEvent read FOnEditButtonClick write FOnEditButtonClick;
Published property Align;
Published property Anchors;
Published property BevelEdges;
Published property BevelInner;
Published property BevelKind;
Published property BevelOuter;
Published property BevelWidth;
Published property BiDiMode;
Published property BorderStyle;
Published property Color;
Published property Constraints;
Published property Ctl3D;
Published property DefaultColWidth;
Published property DefaultRowHeight;
Published property DefaultDrawing;
Published property DoubleBuffered;
Published property DragCursor;
Published property DragKind;
Published property DragMode;
Published property DrawingStyle;
Published property Enabled;
Published property FixedColor;
Published property Font;
Published property GradientEndColor;
Published property GradientStartColor;
Published property GridLineWidth;
Published property Options;
Published property ParentBiDiMode;
Published property ParentColor;
Published property ParentCtl3D;
Published property ParentDoubleBuffered;
Published property ParentFont;
Published property ParentShowHint;
Published property PopupMenu;
Published property ScrollBars;
Published property ShowHint;
Published property TabOrder;
Published property Touch;
Published property Visible;
Published property OnClick;
Published property OnColumnMoved;
Published property OnContextPopup;
Published property OnDblClick;
Published property OnDragDrop;
Published property OnDragOver;
Published property OnDrawCell;
Published property OnEndDock;
Published property OnEndDrag;
Published property OnEnter;
Published property OnExit;
Published property OnFixedCellClick;
Published property OnGesture;
Published property OnGetEditMask;
Published property OnGetEditText;
Published property OnKeyDown;
Published property OnKeyPress;
Published property OnKeyUp;
Published property OnMouseActivate;
Published property OnMouseDown;
Published property OnMouseEnter;
Published property OnMouseLeave;
Published property OnMouseMove;
Published property OnMouseUp;
Published property OnMouseWheelDown;
Published property OnMouseWheelUp;
Published property OnRowMoved;
Published property OnSelectCell;
Published property OnSetEditText;
Published property OnStartDock;
Published property OnStartDrag;
Published property OnTopLeftChanged;

Description

Methods

Public function IsDatasetLinked: Boolean;

indicates whether Grid is linked to any Dataset

Public function IsActive: Boolean;

indicates whether linked Dataset is active

Public function GetFieldCount: integer;

returns count of fields

Public function GetRowCount: integer;

returns count of rows = GetFieldCount

Public function GetField(Idx: integer): TField;

returns field object according row index

Public function GetCaption(Idx: integer): string;

returns field caption according row index

Public function GetValue(Idx: integer): string;

returns field value according row index

Public procedure GetFontStyle(Idx: integer; AFont: TFont; KeepFontNameSize: Boolean);

returns used font according row index

Public function GetDataAlignment(Idx: integer): integer;

returns data alignment according row index

Properties

Public property ScaleRatio: double read FScaleRatio;

define actual scale ratio relative to original designed size

Public property FocusedField: TField read GetFocusedField;

returns fields from selected row

Public property FocusedText: string read GetFocusedText;

returns current text from selected row

Public property VisibleColCount;

returns count of visible columns = 2

Public property VisibleRowCount;

returns count of visible rows

Public property InplaceEditor;

returns link to inplace editor

Published property DataSource: TDataSource read GetDataSource write SetDataSource;

link to datasource, if DBGrid is set then Datasource is set automatically from DBGrid

Published property DBGrid: TCustomDBGrid read FDBGrid write SetDBGrid;

link to DBGrid, Rows (fields) and DataSource are loaded automatically from DBGrid columns

Published property CustomGlyphs: TrCustomGlyphs read FCustomGlyphs write SetCustomGlyphs;

define link to rCustomGlyphs component which can define all glyphs

Published property OnlyVisibleField: Boolean read FOnlyVisibleField write SetOnlyVisibleField default false;

define if not visible field is hiden

Published property OnlySimpleField: Boolean read FOnlySimpleField write SetOnlySimpleField default false;

define if not simple field (memo and graphics) is hiden

Published property FieldsAsLink: TStringList read FFieldsAsLink write SetFieldsAsLink;

Define list of fields as link, can be set easily by design time editor

Published property TitleAlignment: TAlignment read FTitleAlignment write SetTitleAlignment default taLeftJustify;

define allingment of title column

Published property OptionsEx: TGridOptionsEx read FOptionsEx write SetOptionsEx default[];

define extension options

Published property GridDlgVisibleTabs: TGridDlgVisibleTabs read FGridDlgVisibleTabs write FGridDlgVisibleTabs default[vtFieldsSetup, vtSpecFields, vtFieldsAsLink, vtPickLists, vtEllipsisFields];

define witch tabs from design time dialog is visible in run time

Published property Fields: TStringList read FFields write SetFields;

define list of fields and captions

Published property BooleanFields: TStringList read FBooleanFields write SetBooleanFields;

define fields which is shown as boolean

Published property EllipsisFields: TStrings read FEllipsisFields write SetEllipsisFields;

define fields with ellipsis button

Published property SpecFields: TStringList read FSpecFields write SetSpecFields;

list of fields (fieldname) which is shown with SpecFont; for modification of font can be used following format: FieldName=list of format strings separated by ; format string are: SF (standard font) N (normal) B (bold) I (italic) U (underline) colorname fontsize e.g. FirstName=B;Blue;10 LastName=B;U;Red;8

Published property SpecFont: TFont read FSpecFont write SetSpecFont;

define font for fields listed in property SpecFields

Published property PickLists: TStringList read FPickLists write SetPickLists;

define fields and their picklist items, can be set easily by design time editor

Published property DateTimePicker: TDateTimePicker read FDateTimePicker;

Returns TDateTimePicker for setting of their props

Published property OnLinkClick: TLinkClickEvent read FOnLinkClick write FOnLinkClick;

event is called after click to link

Published property OnGetCellParams: TGetCellParamsEvent read FOnGetCellParams write FOnGetCellParams;

event for user defined setting of individual cell params - font, color

Published property OnEditButtonClick: TNotifyEvent read FOnEditButtonClick write FOnEditButtonClick;

event called after click to Ellipsis button

Published property Align;
 
Published property Anchors;
 
Published property BevelEdges;
 
Published property BevelInner;
 
Published property BevelKind;
 
Published property BevelOuter;
 
Published property BevelWidth;
 
Published property BiDiMode;
 
Published property BorderStyle;
 
Published property Color;
 
Published property Constraints;

property ColCount;

Published property Ctl3D;
 
Published property DefaultColWidth;
 
Published property DefaultRowHeight;
 
Published property DefaultDrawing;
 
Published property DoubleBuffered;
 
Published property DragCursor;
 
Published property DragKind;
 
Published property DragMode;
 
Published property DrawingStyle;
 
Published property Enabled;
 
Published property FixedColor;
 
Published property Font;

property FixedCols; property RowCount; property FixedRows;

Published property GradientEndColor;
 
Published property GradientStartColor;
 
Published property GridLineWidth;
 
Published property Options;
 
Published property ParentBiDiMode;
 
Published property ParentColor;
 
Published property ParentCtl3D;
 
Published property ParentDoubleBuffered;
 
Published property ParentFont;
 
Published property ParentShowHint;
 
Published property PopupMenu;
 
Published property ScrollBars;
 
Published property ShowHint;
 
Published property TabOrder;
 
Published property Touch;
 
Published property Visible;
 
Published property OnClick;
 
Published property OnColumnMoved;
 
Published property OnContextPopup;
 
Published property OnDblClick;
 
Published property OnDragDrop;
 
Published property OnDragOver;
 
Published property OnDrawCell;
 
Published property OnEndDock;
 
Published property OnEndDrag;
 
Published property OnEnter;
 
Published property OnExit;
 
Published property OnFixedCellClick;
 
Published property OnGesture;
 
Published property OnGetEditMask;
 
Published property OnGetEditText;
 
Published property OnKeyDown;
 
Published property OnKeyPress;
 
Published property OnKeyUp;
 
Published property OnMouseActivate;
 
Published property OnMouseDown;
 
Published property OnMouseEnter;
 
Published property OnMouseLeave;
 
Published property OnMouseMove;
 
Published property OnMouseUp;
 
Published property OnMouseWheelDown;
 
Published property OnMouseWheelUp;
 
Published property OnRowMoved;
 
Published property OnSelectCell;
 
Published property OnSetEditText;
 
Published property OnStartDock;
 
Published property OnStartDrag;
 
Published property OnTopLeftChanged;
 

Generated by PasDoc 0.15.0.