Форум: "Базы";
Текущий архив: 2005.02.13;
Скачать: [xml.tar.bz2];
ВнизАльтернатива DBGrid. Найти похожие ветки
← →
Mortal © (2005-01-18 13:59) [0]Подскажите есть альтернатива DBGrid?
Если есть, то как называется и где можно взять.
← →
Sergey13 © (2005-01-18 14:02) [1]Так на палитре компонент до хрена чего валяется - и все почти альтернатива. 8-)
← →
Ega23 © (2005-01-18 14:07) [2]
TRxDBGrid = class(TDBGrid)
private
FShowGlyphs: Boolean;
FDefaultDrawing: Boolean;
FMultiSelect: Boolean;
FSelecting: Boolean;
FClearSelection: Boolean;
FTitleButtons: Boolean;
{$IFDEF WIN32}
FPressedCol: TColumn;
{$ELSE}
FPressedCol: Longint;
{$ENDIF}
FPressed: Boolean;
FTracking: Boolean;
FSwapButtons: Boolean;
FIniLink: TIniLink;
FDisableCount: Integer;
FFixedCols: Integer;
FMsIndicators: TImageList;
FOnCheckButton: TCheckTitleBtnEvent;
FOnGetCellProps: TGetCellPropsEvent;
FOnGetCellParams: TGetCellParamsEvent;
FOnGetBtnParams: TGetBtnParamsEvent;
FOnEditChange: TNotifyEvent;
FOnKeyPress: TKeyPressEvent;
FOnTitleBtnClick: TTitleClickEvent;
FOnShowEditor: TDbEditShowEvent;
FOnTopLeftChanged: TNotifyEvent;
{$IFDEF WIN32}
FSelectionAnchor: TBookmarkStr;
{$ELSE}
FSelectionAnchor: TBookmark;
FBookmarks: TBookmarkList;
FOnColumnMoved: TMovedEvent;
{$ENDIF}
function GetImageIndex(Field: TField): Integer;
procedure SetShowGlyphs(Value: Boolean);
procedure SetRowsHeight(Value: Integer);
function GetRowsHeight: Integer;
function GetStorage: TFormPlacement;
procedure SetStorage(Value: TFormPlacement);
procedure IniSave(Sender: TObject);
procedure IniLoad(Sender: TObject);
procedure SetMultiSelect(Value: Boolean);
procedure SetTitleButtons(Value: Boolean);
procedure StopTracking;
procedure TrackButton(X, Y: Integer);
function ActiveRowSelected: Boolean;
function GetSelCount: Longint;
procedure InternalSaveLayout(IniFile: TObject; const Section: string);
procedure InternalRestoreLayout(IniFile: TObject; const Section: string);
{$IFDEF WIN32}
procedure SaveColumnsLayout(IniFile: TObject; const Section: string);
procedure RestoreColumnsLayout(IniFile: TObject; const Section: string);
function GetOptions: TDBGridOptions;
procedure SetOptions(Value: TDBGridOptions);
function GetMasterColumn(ACol, ARow: Longint): TColumn;
{$ELSE}
function GetFixedColor: TColor;
procedure SetFixedColor(Value: TColor);
function GetIndicatorOffset: Byte;
{$ENDIF}
function GetTitleOffset: Byte;
procedure SetFixedCols(Value: Integer);
function GetFixedCols: Integer;
{$IFDEF RX_D4}
function CalcLeftColumn: Integer;
{$ENDIF}
procedure WMChar(var Msg: TWMChar); message WM_CHAR;
procedure WMCancelMode(var Message: TMessage); message WM_CANCELMODE;
{$IFDEF WIN32}
procedure WMRButtonUp(var Message: TWMMouse); message WM_RBUTTONUP;
{$ENDIF}
protected
function AcquireFocus: Boolean;
function CanEditShow: Boolean; override;
function CreateEditor: TInplaceEdit; override;
procedure DoTitleClick(ACol: Longint; AField: TField); dynamic;
procedure CheckTitleButton(ACol, ARow: Longint; var Enabled: Boolean); dynamic;
procedure DrawCell(ACol, ARow: Longint; ARect: TRect; AState: TGridDrawState); override;
procedure DrawDataCell(const Rect: TRect; Field: TField;
State: TGridDrawState); override; { obsolete from Delphi 2.0 }
procedure EditChanged(Sender: TObject); dynamic;
procedure GetCellProps(Field: TField; AFont: TFont; var Background: TColor;
Highlight: Boolean); dynamic;
function HighlightCell(DataCol, DataRow: Integer; const Value: string;
AState: TGridDrawState): Boolean; override;
procedure KeyDown(var Key: Word; Shift: TShiftState); override;
procedure KeyPress(var Key: Char); override;
procedure SetColumnAttributes; override;
procedure MouseDown(Button: TMouseButton; Shift: TShiftState;
X, Y: Integer); override;
procedure MouseMove(Shift: TShiftState; X, Y: Integer); override;
procedure MouseUp(Button: TMouseButton; Shift: TShiftState;
X, Y: Integer); override;
{$IFDEF RX_D4}
function DoMouseWheelDown(Shift: TShiftState; MousePos: TPoint): Boolean; override;
function DoMouseWheelUp(Shift: TShiftState; MousePos: TPoint): Boolean; override;
{$ENDIF}
procedure Scroll(Distance: Integer); override;
procedure LayoutChanged; override;
procedure TopLeftChanged; override;
{$IFDEF WIN32}
procedure DrawColumnCell(const Rect: TRect; DataCol: Integer;
Column: TColumn; State: TGridDrawState); override;
procedure ColWidthsChanged; override;
{$ELSE}
procedure ColumnMoved(FromIndex, ToIndex: Longint); override;
procedure LinkActive(Value: Boolean); override;
{$ENDIF}
procedure Paint; override;
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
procedure DefaultDataCellDraw(const Rect: TRect; Field: TField;
State: TGridDrawState);
procedure DisableScroll;
procedure EnableScroll;
function ScrollDisabled: Boolean;
procedure MouseToCell(X, Y: Integer; var ACol, ARow: Longint);
procedure SaveLayout(IniFile: TIniFile);
procedure RestoreLayout(IniFile: TIniFile);
procedure SelectAll;
procedure UnselectAll;
procedure ToggleRowSelection;
procedure GotoSelection(Index: Longint);
{$IFDEF WIN32}
procedure SaveLayoutReg(IniFile: TRegIniFile);
procedure RestoreLayoutReg(IniFile: TRegIniFile);
property SelectedRows;
{$ELSE}
property SelectedRows: TBookmarkList read FBookmarks;
{$ENDIF WIN32}
property SelCount: Longint read GetSelCount;
property Canvas;
property Col;
property InplaceEditor;
property LeftCol;
property Row;
property VisibleRowCount;
property VisibleColCount;
property IndicatorOffset {$IFNDEF WIN32}: Byte read GetIndicatorOffset {$ENDIF};
property TitleOffset: Byte read GetTitleOffset;
← →
Ega23 © (2005-01-18 14:08) [3]
published
{$IFDEF WIN32}
property Options: TDBGridOptions read GetOptions write SetOptions
default DefRxGridOptions;
{$ELSE}
property FixedColor: TColor read GetFixedColor write SetFixedColor
default clBtnFace; { fix Delphi 1.0 bug }
property Options default DefRxGridOptions;
{$ENDIF}
property FixedCols: Integer read GetFixedCols write SetFixedCols default 0;
property ClearSelection: Boolean read FClearSelection write FClearSelection
default True;
property DefaultDrawing: Boolean read FDefaultDrawing write FDefaultDrawing
default True;
property IniStorage: TFormPlacement read GetStorage write SetStorage;
property MultiSelect: Boolean read FMultiSelect write SetMultiSelect
default False;
property ShowGlyphs: Boolean read FShowGlyphs write SetShowGlyphs
default True;
property TitleButtons: Boolean read FTitleButtons write SetTitleButtons
default False;
property RowsHeight: Integer read GetRowsHeight write SetRowsHeight
stored False; { obsolete, for backward compatibility only }
property OnCheckButton: TCheckTitleBtnEvent read FOnCheckButton write FOnCheckButton;
property OnGetCellProps: TGetCellPropsEvent read FOnGetCellProps
write FOnGetCellProps; { obsolete }
property OnGetCellParams: TGetCellParamsEvent read FOnGetCellParams write FOnGetCellParams;
property OnGetBtnParams: TGetBtnParamsEvent read FOnGetBtnParams write FOnGetBtnParams;
property OnEditChange: TNotifyEvent read FOnEditChange write FOnEditChange;
property OnShowEditor: TDBEditShowEvent read FOnShowEditor write FOnShowEditor;
property OnTitleBtnClick: TTitleClickEvent read FOnTitleBtnClick write FOnTitleBtnClick;
property OnKeyPress: TKeyPressEvent read FOnKeyPress write FOnKeyPress;
property OnTopLeftChanged: TNotifyEvent read FOnTopLeftChanged write FOnTopLeftChanged;
{$IFNDEF WIN32}
property OnColumnMoved: TMovedEvent read FOnColumnMoved write FOnColumnMoved;
{$ENDIF}
{$IFDEF RX_D5}
property OnContextPopup;
{$ENDIF}
property OnMouseDown;
property OnMouseMove;
property OnMouseUp;
{$IFDEF RX_D4}
property OnMouseWheelDown;
property OnMouseWheelUp;
{$ENDIF}
end;
{ TRxDBComboEdit }
TRxDBComboEdit = class(TCustomComboEdit)
private
FDataLink: TFieldDataLink;
{$IFDEF WIN32}
FCanvas: TControlCanvas;
{$ENDIF}
FFocused: Boolean;
procedure DataChange(Sender: TObject);
procedure EditingChange(Sender: TObject);
function GetDataField: string;
function GetDataSource: TDataSource;
function GetField: TField;
procedure SetDataField(const Value: string);
procedure SetDataSource(Value: TDataSource);
procedure SetFocused(Value: Boolean);
procedure SetReadOnly(Value: Boolean);
procedure UpdateData(Sender: TObject);
procedure WMCut(var Message: TMessage); message WM_CUT;
procedure WMPaste(var Message: TMessage); message WM_PASTE;
procedure CMEnter(var Message: TCMEnter); message CM_ENTER;
procedure CMExit(var Message: TCMExit); message CM_EXIT;
{$IFDEF WIN32}
procedure CMGetDataLink(var Message: TMessage); message CM_GETDATALINK;
procedure WMPaint(var Message: TWMPaint); message WM_PAINT;
{$ENDIF}
protected
procedure Change; override;
function EditCanModify: Boolean; override;
function GetReadOnly: Boolean; override;
procedure KeyDown(var Key: Word; Shift: TShiftState); override;
procedure KeyPress(var Key: Char); override;
procedure Loaded; override;
procedure Notification(AComponent: TComponent;
Operation: TOperation); override;
procedure Reset; override;
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
{$IFDEF RX_D4}
function ExecuteAction(Action: TBasicAction): Boolean; override;
function UpdateAction(Action: TBasicAction): Boolean; override;
function UseRightToLeftAlignment: Boolean; override;
{$ENDIF}
property Button;
property Field: TField read GetField;
published
property AutoSelect;
property BorderStyle;
property ButtonHint;
property CharCase;
property ClickKey;
property Color;
property Ctl3D;
property DataField: string read GetDataField write SetDataField;
property DataSource: TDataSource read GetDataSource write SetDataSource;
property DirectInput;
property DragCursor;
property DragMode;
property Enabled;
property Font;
property GlyphKind;
{ Ensure GlyphKind is published before Glyph and ButtonWidth }
property Glyph;
property ButtonWidth;
property HideSelection;
{$IFDEF RX_D4}
property Anchors;
property BiDiMode;
property Constraints;
property DragKind;
property ParentBiDiMode;
{$ENDIF}
{$IFDEF WIN32}
{$IFNDEF VER90}
property ImeMode;
property ImeName;
{$ENDIF}
{$ENDIF}
property MaxLength;
property NumGlyphs;
property ParentColor;
property ParentCtl3D;
property ParentFont;
property ParentShowHint;
property PopupMenu;
property ReadOnly: Boolean read GetReadOnly write SetReadOnly default False;
property ShowHint;
property TabOrder;
property TabStop;
property Visible;
property OnButtonClick;
property OnChange;
property OnClick;
property OnDblClick;
property OnDragDrop;
property OnDragOver;
property OnEndDrag;
property OnEnter;
property OnExit;
property OnKeyDown;
property OnKeyPress;
property OnKeyUp;
property OnMouseDown;
property OnMouseMove;
property OnMouseUp;
{$IFDEF WIN32}
property OnStartDrag;
{$ENDIF}
{$IFDEF RX_D5}
property OnContextPopup;
{$ENDIF}
{$IFDEF RX_D4}
property OnEndDock;
property OnStartDock;
{$ENDIF}
end;
← →
Val © (2005-01-18 14:15) [4]>[2] Ega23 © (18.01.05 14:07)
Зачем?
>Mortal © (18.01.05 13:59)
Принтер тоже альтернатива. Может раскроете вопрос?
← →
HSolo © (2005-01-18 14:16) [5]Может, есть, а может, и нет :) Все зависит от того, чего именно Вам не хватает в стандартном DBGrid.
Загляните сюда:
http://www.delphikingdom.com/asp/viewitem.asp?catalogid=806
http://www.delphikingdom.com/asp/viewitem.asp?catalogid=168
← →
Плохиш © (2005-01-18 14:17) [6]
>Ega23 © (18.01.05 14:08) [3]
Класс :-))
Ну, никто алтернативу TLabel не желает? ;-)
← →
Danilka © (2005-01-18 14:22) [7]Мне EhLib нравицца. А так, на торри.нет этих альтернатив - куча великая.
← →
Danilka © (2005-01-18 14:23) [8][6] Плохиш © (18.01.05 14:17)
А что, их есть у тебя? :)
Кстати, видел где-то - поддерживает гаперссылки и html-форматирование. :))
← →
Danilka © (2005-01-18 14:24) [9]>гаперссылки
гиперссылки, разумеется. :)
Страницы: 1 вся ветка
Форум: "Базы";
Текущий архив: 2005.02.13;
Скачать: [xml.tar.bz2];
Память: 0.49 MB
Время: 0.034 c