?? wwprpedt.pas
字號:
end;
end;
Procedure TwwPictureProperty.Edit;
var component: TwwCustomMaskEdit;
i: integer;
begin
component:= GetComponent(0) as TwwCustomMaskEdit;
if wwPrpEdit_PictureMask2(component) then
begin
for i:= 1 to PropCount-1 do {8/23/96 - Change all selected controls }
begin
with GetComponent(i) as TwwCustomMaskEdit do begin
Picture.PictureMask:= component.Picture.PictureMask;
Picture.AutoFill:= component.Picture.AutoFill;
Picture.AllowInvalidExit:= component.Picture.AllowInvalidExit;
UsePictureMask:= component.UsePictureMask;
end
end;
Designer.modified;
end
end;
function TwwPictureProperty.GetAttributes: TPropertyAttributes;
begin
Result:= [paMultiSelect, paSubProperties, paReadOnly, paDialog];
end;
function TwwRegexProperty.GetValue: string;
begin
with (GetComponent(0) as TwwCustomMaskEdit) do begin
result:= RegexMask.Mask;
end;
end;
Procedure TwwRegexProperty.Edit;
var component: TwwCustomMaskEdit;
i: integer;
begin
component:= GetComponent(0) as TwwCustomMaskEdit;
if wwPrpEdit_RegexMask2(component) then
begin
for i:= 1 to PropCount-1 do {8/23/96 - Change all selected controls }
begin
with GetComponent(i) as TwwCustomMaskEdit do begin
RegexMask.Mask:= component.RegexMask.Mask;
RegexMask.CaseSensitive:= component.RegexMask.CaseSensitive;
// UsePictureMask:= component.UsePictureMask;
end
end;
Designer.modified;
end
end;
function TwwRegexProperty.GetAttributes: TPropertyAttributes;
begin
Result:= [paMultiSelect, paSubProperties, paReadOnly, paDialog];
end;
Procedure TwwPicturePropertyGen.Edit;
var component: TCustomEdit;
begin
component:= GetComponent(0) as TCustomEdit;
if wwPrpEdit_PictureMaskGen(component) then
begin
Designer.modified;
end
end;
function TwwPicturePropertyGen.GetAttributes: TPropertyAttributes;
begin
Result:= [paDialog];
end;
function TwwPicturePropertyGen.GetValue: string;
begin
result:= wwGetControlPictureMask(GetComponent(0) as TCustomEdit);
end;
procedure Register;
begin
{
RegisterPropertyEditor(TypeInfo(TStrings),
TwwDBLookupList, '', TwwDBLookupDisplayProperty);
RegisterPropertyEditor(TypeInfo(TStrings),
TwwDBLookupCombo, '', TwwDBLookupDisplayProperty);
RegisterComponentEditor(TwwDBLookupList, TwwDBLookupDisplayComponentEditor);
RegisterComponentEditor(TwwDBLookupCombo, TwwDBLookupDisplayComponentEditor);
}
end;
Procedure TwwFilterFieldsProperty.Edit;
var
listHandle : TStrings;
component: TwwFilterDialog;
begin
component:= GetComponent(0) as TwwFilterDialog;
if (component.dataSource=Nil) then begin
MessageDlg('Missing Datasource Property', mtInformation, [mbok], 0);
exit;
end;
listHandle:= component.SelectedFields;
if wwSelectFilterableFields(component, listHandle) then
begin
Designer.modified;
end;
end;
Function TwwFilterfieldsProperty.GetAttributes: TPropertyAttributes;
begin
result:= [paDialog];
end;
Function TwwFilterFieldsProperty.GetValue: string;
begin
result:= '<TStringList>'
end;
procedure TwwRecordViewComponentEditor.edit;
begin
(Component as TwwRecordViewDialog).execute;
end;
{procedure TwwDataInspectorComponentEditor.edit;
var
ListHandle: TStrings;
DataSet: TDataSet;
useTFields: boolean;
begin
GetComponentData(Component, listHandle, dataSet);
if (dataset=Nil) then begin
MessageDlg('Component requires a DataSourc/DataSet', mtInformation, [mbok], 0);
exit;
end;
useTFields:= False;
if (EditSelectedFieldsProperty(component, listHandle, DataSet,
Designer, True, useTFields, sptObjectViewType)) then
begin
(Component as TwwDataInspector).ApplySettings;
end
end;
}
{$ifdef win32}
Procedure TwwRichEditItemsProperty.Edit;
var richedit: TwwCustomRichEdit;
prevoptions: TwwRichEditOptions;
begin
richedit:= GetComponent(0) as TwwCustomRichEdit;
prevOptions:= richedit.editoroptions;
richedit.editoroptions:= richedit.editoroptions + [reoShowLoad];
if richedit.execute then Designer.modified;
richedit.editoroptions:= prevOptions;
end;
function TwwRichEditItemsProperty.GetAttributes: TPropertyAttributes;
begin
result:= [paDialog]
end;
function TwwRichEditItemsProperty.GetValue: string;
begin
result:= '<TStringList>'
end;
procedure TwwRichEditComponentEditor.edit;
var richedit: TwwCustomRichEdit;
prevoptions: TwwRichEditOptions;
begin
richedit:= (Component as TwwCustomRichEdit);
prevOptions:= richedit.editoroptions;
richedit.editoroptions:= richedit.editoroptions + [reoShowLoad];
if (Component as TwwCustomRichEdit).execute then
Designer.modified;
richedit.editoroptions:= prevOptions;
end;
procedure TwwRichEditBarComponentEditor.edit;
var richedit: TwwCustomRichEdit;
prevoptions: TwwRichEditOptions;
begin
richedit:= (Component as TwwRichEditBar).RichEdit;
prevOptions:= richedit.editoroptions;
richedit.editoroptions:= richedit.editoroptions + [reoShowLoad];
if (richedit).execute then
Designer.modified;
richedit.editoroptions:= prevOptions;
end;
{$endif}
function TwwControllerListProperty.GetAttributes: TPropertyAttributes;
begin
Result:= [paReadOnly];
end;
function TwwControllerListProperty.GetValue: string;
begin
Result:= '<InfoPower use only>'
end;
{$ifdef wwDelphi3Up}
function TwwIndexDefsProperty.GetAttributes: TPropertyAttributes;
begin
Result:= [paReadOnly];
end;
function TwwIndexDefsProperty.GetValue: string;
begin
Result:= '<InfoPower use only>'
end;
{$endif}
function TwwObjPictureProperty.GetValue: string;
begin
with (GetComponent(0) as TwwInspectorItem) do
result:= Picture.PictureMask;
end;
Procedure TwwObjPictureProperty.Edit;
var component: TwwInspectorItem;
i: integer;
begin
component:= GetComponent(0) as TwwInspectorItem;
{$ifdef wwDelphi6Up}
if wwPrpEdit_PictureMask3(component.Picture, Designer.Root as TWinControl) then
{$else}
if wwPrpEdit_PictureMask3(component.Picture, Designer.Form) then
{$endif}
begin
for i:= 1 to PropCount-1 do {8/23/96 - Change all selected controls }
begin
with GetComponent(i) as TwwInspectorItem do begin
Picture.PictureMask:= component.Picture.PictureMask;
Picture.AutoFill:= component.Picture.AutoFill;
Picture.AllowInvalidExit:= component.Picture.AllowInvalidExit;
// UsePictureMask:= component.UsePictureMask;
end
end;
Designer.modified;
end
end;
function TwwObjPictureProperty.GetAttributes: TPropertyAttributes;
begin
Result:= [paMultiSelect, paSubProperties, paReadOnly, paDialog];
end;
Procedure TwwMultiLineStringProperty.SetValue(const value: string);
var PropInfo: PPropInfo;
begin
PropInfo:= GetPropInfo;
SetStrProp(GetComponent(0), PropInfo, value);
end;
function TwwMultiLineStringProperty.GetValue: string;
var PropInfo: PPropInfo;
begin
PropInfo:= GetPropInfo;
result:= GetStrProp(GetComponent(0), PropInfo);
end;
Procedure TwwMultiLineStringProperty.Edit;
var PropInfo: PPropInfo;
memoDialog: TwwMemoDialog;
s: string;
i: integer;
begin
PropInfo:= GetPropInfo;
if PropInfo=nil then exit;
memoDialog:= TwwMemoDialog.create(nil);
s:= GetStrProp(GetComponent(0), PropInfo);
s:= strRemoveChar(s, #10);
strBreakApart(s, #13, memodialog.lines);
if memoDialog.execute then
begin
s:= '';
for i:= 0 to MemoDialog.lines.count-1 do
begin
if i>0 then s:= s + #13;
s:= s + memodialog.lines[i];
end;
SetStrProp(GetComponent(0), PropInfo, s);
Designer.modified;
end;
memodialog.free;
end;
function TwwMultiLineStringProperty.GetAttributes: TPropertyAttributes;
begin
Result:= [paDialog];
end;
function TwwComponentEditor.GetVerbCount: Integer;
begin
result := 1;
end;
function TwwComponentEditor.GetVerb(Index: Integer): string;
begin
if Index = 0 then result := '&About InfoPower Studio 2007';
end;
procedure TwwComponentEditor.ShowAboutBox;
var ipReg: TRegIniFile;
ARegNumber: string;
begin
ipreg := TRegIniFile.create('');
ARegNumber := ipreg.ReadString('\Software\Woll2Woll\InfoPowerStudio2007', 'RegNo', '');
ipreg.Free;
with TIPAboutForm.create(nil) do begin
AVersion:= 'Version: ' + wwInternational.VersionInfoPower;
ARegistration:= 'Reg. No.: ' + ARegNumber;
ShowModal;
Free;
end;
end;
procedure TwwComponentEditor.ExecuteVerb(Index: Integer);
begin
if Index = 0 then ShowAboutBox;
end;
function TwwGridComponentEditor.GetVerbCount: Integer;
begin
if SupportIniSave then
begin
result:= inherited GetVerbCount + 2;
end
else result:= inherited GetVerbCount + 1;
end;
function TwwGridComponentEditor.GetVerb(Index: Integer): string;
begin
result:= inherited GetVerb(Index);
if SupportIniSave then
begin
if Index = GetVerbCount - 1 then result := '&Clear Custom Control Information'
else if (Index = GetVerbCount - 2) then result := '&Save settings to INI file';
end
else if Index = GetVerbCount - 1 then result := '&Clear Custom Control Information'
end;
procedure TwwGridComponentEditor.ExecuteVerb(Index: Integer);
procedure ClearControls;
begin
wwClearControls(Component);
end;
begin
if SupportIniSave then
begin
if (Index = GetVerbCount - 2) and (Component is TwwDBGrid) then
TwwDBGrid(Component).SaveToIniFile
else if Index = GetVerbCount - 1 then
begin
ClearControls;
if Component is TwwDBGrid then TwwDBgrid(Component).RefreshDisplay
end
end
else if Index = GetVerbCount - 1 then
begin
ClearControls;
if Component is TwwDBGrid then TwwDBgrid(Component).RefreshDisplay
end
else inherited ExecuteVerb(Index)
end;
Function TwwGridComponentEditor.SupportIniSave: boolean;
begin
result:= False;
// if (Component is TwwDBGrid) and TwwDBgrid(Component).IniAttributes.Enabled then
end;
end.
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -