📄 iwadvwebgridde.pas
字号:
{***************************************************************************}
{ TMS IntraWeb Component Pack Pro }
{ for Delphi & C++Builder }
{ version 2.3 }
{ }
{ written by TMS Software }
{ copyright ?2002 - 2004 }
{ Email : info@tmssoftware.com }
{ Web : http://www.tmssoftware.com }
{ }
{ The source code is given as is. The author is not responsible }
{ for any possible damage done due to the use of this code. }
{ The component can be freely used in any application. The complete }
{ source code remains property of the author and may not be distributed, }
{ published, given or sold in any form as such. No parts of the source }
{ code can be included in any other component or application without }
{ written authorization of the author. }
{***************************************************************************}
unit IWAdvWebGridDE;
{$I TMSDEFS.INC}
interface
uses
Classes, IWAdvWebGrid, IWWebGrid, Forms, DesignIntf, DesignEditors,
{$IFNDEF LINUX}
IWHTMLDE, IWTMSImgDE, IWTMSImg, IWGridGallery, IWTMSBase
{$ENDIF}
//{$IFDEF DELPHI6_LVL}
// DesignIntf, DesignEditors
//{$ELSE}
// DsgnIntf
//{$ENDIF}
;
type
TIWAdvWebGridEditor = class(TDefaultEditor)
protected
//{$IFNDEF DELPHI6_LVL}
// procedure EditProperty(PropertyEditor: TPropertyEditor;
// var Continue, FreeEditor: Boolean); override;
//{$ELSE}
procedure EditProperty(const PropertyEditor: IProperty; var Continue: Boolean); override;
//{$ENDIF}
public
function GetVerb(index:integer):string; override;
function GetVerbCount:integer; override;
procedure ExecuteVerb(Index:integer); override;
end;
procedure Register;
implementation
uses
SysUtils, Dialogs;
//{$IFDEF DELPHI6_LVL}
procedure TIWAdvWebGridEditor.EditProperty(const PropertyEditor: IProperty; var Continue: Boolean);
//{$ELSE}
//procedure TIWAdvWebGridEditor.EditProperty(PropertyEditor: TPropertyEditor;
// var Continue, FreeEditor: Boolean);
//{$ENDIF}
var
PropName: string;
begin
PropName := PropertyEditor.GetName;
if (CompareText(PropName, 'COLUMNS') = 0) then
begin
PropertyEditor.Edit;
Continue := False;
end;
end;
procedure TIWAdvWebGridEditor.ExecuteVerb(Index: integer);
var
compiler: string;
Gallery: TGridGallery;
begin
case Index of
0:begin
{$IFDEF VER130}
{$IFDEF BCB}
compiler := 'C++Builder 5';
{$ELSE}
compiler := 'Delphi 5';
{$ENDIF}
{$ENDIF}
{$IFDEF VER140}
{$IFDEF BCB}
compiler := 'C++Builder 6';
{$ELSE}
compiler := 'Delphi 6';
{$ENDIF}
{$ENDIF}
{$IFDEF VER150}
compiler := 'Delphi 7';
{$ENDIF}
{$IFDEF VER170}
compiler := 'Delphi 2005';
{$ENDIF}
{$IFDEF LINUX}
{$IFDEF VER140}
compiler := 'Kylix 2';
{$ENDIF}
{$IFDEF VER150}
compiler := 'Kylix 3';
{$ENDIF}
{$ENDIF}
MessageDlg(Component.ClassName+' version '+(Component as TTIWCustomAdvWeBGrid).GetVersionString+' for '+compiler+#13#10'?2002 - 2004 by TMS software',
mtinformation,[mbok],0);
end;
1:begin
ForceDirectories(GetProgramFiles + '\tmssoftware\TMSIWPRO\Preferences\Grids\');
Gallery := TGridGallery.Create(Application);
Gallery.Component := Component;
Gallery.FilePath := GetProgramFiles + '\tmssoftware\TMSIWPRO\Preferences\Grids\';
Gallery.FillList;
Gallery.ShowModal;
Gallery.Free;
Designer.Modified;
end;
end;
end;
function TIWAdvWebGridEditor.GetVerb(index: integer): string;
begin
case index of
0:Result := '&About';
1:Result := '&Gallery';
end;
end;
function TIWAdvWebGridEditor.GetVerbCount: integer;
begin
Result := 2;
end;
procedure Register;
begin
{$IFDEF VER170}
ForceDemandLoadState(dlDisable);
EnableDemandLoadReport(false);
{$ENDIF}
{$IFNDEF LINUX}
RegisterPropertyEditor(TypeInfo(string), TTIWWebGridColumn, 'Template', TIWHTMLStringProperty);
RegisterPropertyEditor(TypeInfo(string), TTIWWebGridColumn, 'Title', TIWHTMLStringProperty);
RegisterPropertyEditor(TypeInfo(string), TTIWWebGridColumn, 'SubTitle', TIWHTMLStringProperty);
RegisterPropertyEditor(TypeInfo(string), TTIWWebGridColumn, 'DetailTemplate', TIWHTMLStringProperty);
RegisterPropertyEditor(TypeInfo(string), TTIWAdvWebGridController, 'Caption', TIWHTMLStringProperty);
{$ENDIF}
RegisterComponentEditor(TTIWAdvWebGrid,TIWAdvWebGridEditor);
RegisterComponentEditor(TTIWAdvDetailWebGrid,TIWAdvWebGridEditor);
{$IFNDEF LINUX}
RegisterPropertyEditor(TypeInfo(TIPicture), TTIWAdvWebGridController, 'ImgPrev', TTIWAdvImageProperty);
RegisterPropertyEditor(TypeInfo(TIPicture), TTIWAdvWebGridController, 'ImgNext', TTIWAdvImageProperty);
RegisterPropertyEditor(TypeInfo(TIPicture), TTIWAdvWebGridController, 'ImgFirst', TTIWAdvImageProperty);
RegisterPropertyEditor(TypeInfo(TIPicture), TTIWAdvWebGridController, 'ImgLast', TTIWAdvImageProperty);
RegisterPropertyEditor(TypeInfo(TIPicture), TIWGridNode,'NodeOpen', TTIWAdvImageProperty);
RegisterPropertyEditor(TypeInfo(TIPicture), TIWGridNode,'NodeClosed', TTIWAdvImageProperty);
RegisterPropertyEditor(TypeInfo(TIPicture), TIWGridBackground,'Picture', TTIWAdvImageProperty);
RegisterPropertyEditor(TypeInfo(TIPicture), TTIWCustomWebGrid, 'CheckTruePicture', TTIWAdvImageProperty);
RegisterPropertyEditor(TypeInfo(TIPicture), TTIWCustomWebGrid, 'CheckFalsePicture', TTIWAdvImageProperty);
{$ENDIF}
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -