Rosi ComponentsUnits Class Hierarchy Classes, Interfaces, Objects and Records Types Variables Constants Functions and Procedures Identifiers
|
Class TrStringGridEd
Unit
rStringGridEd
Declaration
type TrStringGridEd = class(TStringGrid)
Description
enhanced TStringGrid component which introduce Columns property for setting and storing of properties for each column
Hierarchy
- TStringGrid
- TrStringGridEd
Overview
Methods
Properties
Description
Methods
|
procedure BeginUpdate(UseChangeLog: boolean = false); |
start updating of the cell data - blocks refreshing after each update, call EndUpdate after all updates
|
|
procedure EndUpdate; |
finish updating of the cell data, call after all updates if BeginUpdate is used
|
|
function IsValidData(ACol, ARow: longint): TrStringGridEdDataState; |
return state of data in cell - empty, ok, invalid, outoflimit
|
|
function GetDataType(ACol, ARow: longint): TrStringGridEdDataType; virtual; |
return type of data in cell - text, int, double, datetime
|
|
function GetDataAlignment(ACol, ARow: longint): TAlignment; virtual; |
return alignment of data in cell
|
|
function GetNumFormat(ACol, ARow: longint): string; virtual; |
return numeric format of data in cell
|
|
procedure GetCellStyle(ACol, ARow: longint; ACanvas: TCanvas); |
set Canvas style for data in cell
|
|
function CellInSelectedRange(ACol, ARow: longint): boolean; |
return whether cell is inside of range select
|
|
procedure ClearSelRange; |
clear content of selected range
|
|
function CopySelRange: string; |
copy selected range to clipboard, columns are separated by TABs and prepared to paste in Excel
|
|
procedure PasteSelRange(CanExpandGrid: boolean; const PasteData: string = ''); |
paste values from clipboard to cells starting by selected cell (columns separated by TABs)
|
|
function CopyEntireTable(IncludingFixedRows: boolean = true; IncludingFixedColumns: boolean = true; Separator: string = #9): string; |
copy entire table to clipboard, returns clipboard text
|
|
procedure PasteEntireTable(CanExpandGrid: boolean; const PasteData: string = ''); |
paste values from clipboard to grid from cell 0,0 (columns separated by TABs)
|
|
procedure ClearEntireTable(IncludingFixedCells: boolean = false); |
clear all cells
|
|
procedure SaveToFile(const FileName: string; Encoding: TEncoding = nil; Separator: string = #9); |
store entire table to file, columns are separated by TABs and prepared for using in Excel
|
|
procedure LoadFromFile(const FileName: string; SkipAllChecks: boolean = false; Encoding: TEncoding = nil; Separator: string = #9); |
load entire table from file (columns separated by TABs)
|
|
function FindIniRow(const IniKey: string): longint; |
find row index of the Key
|
|
function SaveToIniFile(const IniFileName: string; Encoding: TEncoding = nil): string; |
store 2 columns to ini file if defined and/or return inifile text content (Key=Value)
|
|
procedure LoadFromIniFile(const IniFileName: string; const IniFileContent: string = ''; Encoding: TEncoding = nil); |
load 2 columns from ini file or from inifile text content (Key=Value), increase row count if needed
|
|
procedure LoadValuesFromIniFile(const IniFileName: string; const IniFileContent: string = ''; Encoding: TEncoding = nil); |
load ValueColumn from ini file (Key=Value), do not change KeyColumn and row count
|
|
function IsIniGroupRow(ARow: longint): boolean; |
return whether row is defined as Group row for INI grid
|
|
procedure SetColumnAutoFit(ColIdx: longint); |
set column width according data width
|
|
procedure SetColumnsAutoFit; |
set all columns width according data width
|
|
function GetColumnDataWidth(ColIdx: longint; MaxRowsToTest: longint = 10000): integer; virtual; |
get maximal length or Field datawidth for the column
|
|
procedure DoEllipsisClick; |
simulate click to ellipsis button
|
|
procedure FinishEditing; |
hide editor and finish editing
|
|
procedure ResetChangeLog; |
reset list of changed Rows and Cells
|
|
function ActiveCellText: string; |
return content of active cell
|
|
function IsRowEmpty(ARow: longint; SkipFixedCol: boolean = true; ColumnGroup: integer = 0): boolean; |
return true if all cells in row is empty
|
|
procedure SelectFirstCell(minCol: longint = 0; minRow: longint = 0); |
move cursor to first selectable cell
|
|
procedure MoveRowEx(FromIndex, ToIndex: longint); |
move row to new position
|
|
procedure InsertRowEx(RowIndex: longint; NumberOfRows: integer = 1; Activate: boolean = true); |
insert new empty row to define index position
|
|
procedure DeleteRowEx(RowIndex: longint; NumberOfRows: integer = 1); |
delete whole row
|
|
procedure MoveColumnEx(FromIndex, ToIndex: longint); |
move column to new position
|
|
procedure InsertColumnEx(ColIndex: longint; NumberOfCols: integer = 1; Activate: boolean = true); |
insert new empty column to define index position
|
|
procedure DeleteColumnEx(ColIndex: longint; NumberOfCols: integer = 1); |
delete whole column
|
|
procedure SortData(ColIndex: integer; Desc: boolean = false; ResetSelection: boolean = false); |
sort data/rows according selected column
|
Properties
|
property ScaleRatio: double read FScaleRatio; |
define actual scale ratio relative to original designed size
|
|
property MouseDownCoord: TGridCoord read MDownCoord; |
returns grid coord of last Mouse down (click or dblclick)
|
|
property MouseDownCellPoint: TPoint read MDownCellPoint; |
returns point coord of the last Mouse down in the selected cell (reset to (0,0) after cell selection)
|
|
property StringCells[ACol,ARow:longint]: string read GetStringCells write SetStringCells; |
read and set cells as string value
|
|
property NumCells[ACol,ARow:longint]: double read GetNumCells write SetNumCells; |
read and set cells as double value
|
|
property IntCells[ACol,ARow:longint]: integer read GetIntCells write SetIntCells; |
read and set cells as integer value
|
|
property BoolCells[ACol,ARow:longint]: boolean read GetBoolCells write SetBoolCells; |
read and set cells as boolean value
|
|
property DateTimeCells[ACol,ARow:longint]: TDateTime read GetDateTimeCells write SetDateTimeCells; |
read and set cells as boolean value
|
|
property SelectedRange: TGridRect read GetSelectedRange write SetSelectedRange; |
return or set selection range coordinates
|
|
property IniValues[constIniKey:string]: string read GetIniValue write SetIniValue; |
load or set Value for the Key
|
|
property ChangedRows: TStrings read FChangedRows; |
store list of Row index which was modified
|
|
property ChangedCells: TStrings read FChangedCells; |
store list of cells coordinates which was modified; format: ColIdx;RowIdx
|
|
property RichTextTopMargin: integer read FRichTextTopMargin write SetRichTextTopMargin; |
top margin of RitchText in the cell
|
|
property TextApostrophe: char read FTextApostrophe write FTextApostrophe; |
apostrophe used on beginning and end of the string for copy, load, save
|
|
property CustomGlyphs: TrCustomGlyphs read FCustomGlyphs write SetCustomGlyphs; |
define link to rCustomGlyphs component which can define all glyphs
|
|
property OptionsEx: TOptionsEx read FOptionsEx write SetOptionsEx default[]; |
list of new options
|
|
property ColCount: longint read GetColCount write SetColCount default 5; |
define number of columns, columns collection is updated automatically
|
|
property IniKeyColumn: integer read FIniKeyColumn write FIniKeyColumn default 0; |
define index of Key column for INI function
|
|
property IniValueColumn: integer read FIniValueColumn write FIniValueColumn default 1; |
define index of Value column for INI function
|
|
property InnerMargin: integer read FInnerMargin write SetInnerMargin default 0; |
define inner space between cell border and text in cell
|
|
property TitleRowHeight: integer read FTitleRowHeight write SetTitleRowHeight default 0; |
Defines number of lines in title row
|
|
property AutoRowHeight: boolean read FAutoRowHeight write SetAutoRowHeight default false; |
define whether row of column is set automatically, can be used with textwrap property of some column
|
|
property AutoRowMaxHeight: integer read FAutoRowMaxHeight write FAutoRowMaxHeight default 0; |
define maximal row height during automatic setting (used if AutoRowHeight is set)
|
|
property AutoAddNewRow: boolean read FAutoAddNewRow write SetAutoAddNewRow default false; |
define whether new row is automatically added if last row is edited
|
|
property ChangedCellsBkColor: TColor read FChangedCellsBkColor write SetChangedCellsBkColor default clInfoBk; |
define background color of changed cells (used if dgColorChangedCells is set to true)
|
|
property SelectedCellBkColor: TColor read FSelectedCellBkColor write SetSelectedCellBkColor default clNone; |
define background color of active cell with focus, default highlight is used if set to clNone
|
|
property InRangeCellsBkColor: TColor read FInRangeCellsBkColor write SetInRangeCellsBkColor default clNone; |
define background color of cell in the selected range, default highlight is used if set to clNone
|
|
property CustomEditorCreate: TCustomEditorCreate read FCustomEditorCreate write FCustomEditorCreate; |
event type for creating of CustomEditor
|
|
property CustomEditorEvent: TCustomEditorEvent read FCustomEditorEvent write FCustomEditorEvent; |
event type for CustomEditor action
|
|
property OnDrawCellBackground: TDrawCellEvent read FOnDrawCellBackground write FOnDrawCellBackground; |
event is called to draw cell background directly
|
|
property OnGetHintText: TGetHintText read FGetHintText write FGetHintText; |
event for user defined setting of hint string
|
|
property OnCellClick: TFixedCellClickEvent read FOnCellClick write FOnCellClick; |
event for user defined action after user click to any non fixed cell
|
|
property OnEllipsisClicked: TrStringGridEdCellEvent read FOnEllipsisClicked write FOnEllipsisClicked; |
event for user defined action after click to ellipsis button
|
|
property OnPicklistDropdown: TrStringGridEdDropdownEvent read FOnPicklistDropdown write FOnPicklistDropdown; |
event for user defined setting of values after click on drop down button
|
|
property OnEditorEvent: TrStringGridEdEditorEvent read FOnEditorEvent write FOnEditorEvent; |
universal event called in different events of inplace editor
|
|
property OnGetCellParams: TGetCellParamsEvent read FOnGetCellParams write FOnGetCellParams; |
event for user defined setting of individual cell params - font, color
|
|
property OnGetCellParamsEx: TGetCellParamsEventEx read FOnGetCellParamsEx write FOnGetCellParamsEx; |
event for user defined setting of individual cell extended params - font, color, image
|
|
property OnGetDataType: TGetDataTypeEvent read FOnGetDataType write FOnGetDataType; |
event for user defined setting of datatype for individual cell
|
|
property OnGetNumFormat: TGetNumFormat read FOnGetNumFormat write FOnGetNumFormat; |
event for user defined setting of numformat for individual cell
|
|
property OnGetEditStyle: TGetEditStyleEvent read FOnGetEditStyle write FOnGetEditStyle; |
event for user defined setting of editstyle for individual cell
|
|
property OnCanEdit: TCanEditEvent read FOnCanEdit write FOnCanEdit; |
event for user defined setting whether individual cell can be edited
|
|
property OnFinishCellEditing: TrStringGridEdCellEvent read FOnFinishCellEditing write FOnFinishCellEditing; |
event for user defined action after editing of cell is finished
|
|
property OnEditorKeyPress: TKeyPressEvent read FOnEditorKeyPress write FOnEditorKeyPress; |
event for user defined action after press of key in editor
|
|
property OnColumnRestoreDefault: TOnColumnRestoreDefault read FOnColumnRestoreDefault write FOnColumnRestoreDefault; |
event for user defined action for setting of default values
|
|
property OnGetEllipsisButtonFormat: TGetEllipsisButtonFormat read FOnGetEllipsisButtonFormat write FOnGetEllipsisButtonFormat; |
event is called to define format of Ellipsis button in the cell
|
|
property OnProgress: TOnProgress read FOnProgress write FOnProgress; |
event is called during sorting of data
|
|
property OnGeneralEvent: TGeneralEvent read FOnGeneralEvent write FOnGeneralEvent; |
event is called in many events to add posibility of any custom code and to skip rest of the standard event
|
Generated by PasDoc 0.15.0.
|