📄 frxdctrl.pas
字号:
inherited;
FDateEdit:= TDateTimePicker.Create(nil);
FDateEdit.OnChange:= DoOnChange;
InitControl(FDateEdit);
Width:= 145;
Height:= 21;
end;
class function TfrxDateEditControl.GetDescription:String;
begin
Result:= frxResources.Get('obDateEdit');
end;
function TfrxDateEditControl.GetDate:TDateTime;
begin
Result:= FDateEdit.Date;
end;
function TfrxDateEditControl.GetDateFormat:TDTDateFormat;
begin
Result:= FDateEdit.DateFormat;
end;
procedure TfrxDateEditControl.SetDate(const Value:TDateTime);
begin
FDateEdit.Date:= Value;
end;
procedure TfrxDateEditControl.SetDateFormat(const Value:TDTDateFormat);
begin
FDateEdit.DateFormat:= Value;
end;
procedure TfrxDateEditControl.DoOnChange(Sender:TObject);
begin
if Report<>nil then
Report.DoNotifyEvent(Self, FOnChange);
end;
{ TfrxImageControl }
constructor TfrxImageControl.Create(AOwner:TComponent);
begin
inherited;
FImage:= TImage.Create(nil);
InitControl(FImage);
Width:= 100;
Height:= 100;
end;
class function TfrxImageControl.GetDescription:String;
begin
Result:= frxResources.Get('obImageC');
end;
function TfrxImageControl.GetAutoSize:Boolean;
begin
Result:= FImage.AutoSize;
end;
function TfrxImageControl.GetCenter:Boolean;
begin
Result:= FImage.Center;
end;
function TfrxImageControl.GetPicture:TPicture;
begin
Result:= FImage.Picture;
end;
function TfrxImageControl.GetStretch:Boolean;
begin
Result:= FImage.Stretch;
end;
procedure TfrxImageControl.SetAutoSize(const Value:Boolean);
begin
FImage.AutoSize:= Value;
end;
procedure TfrxImageControl.SetCenter(const Value:Boolean);
begin
FImage.Center:= Value;
end;
procedure TfrxImageControl.SetPicture(const Value:TPicture);
begin
FImage.Picture.Assign(Value);
end;
procedure TfrxImageControl.SetStretch(const Value:Boolean);
begin
FImage.Stretch:= Value;
end;
{ TfrxBevelControl }
constructor TfrxBevelControl.Create(AOwner:TComponent);
begin
inherited;
FBevel:= TBevel.Create(nil);
InitControl(FBevel);
Width:= 50;
Height:= 50;
end;
class function TfrxBevelControl.GetDescription:String;
begin
Result:= frxResources.Get('obBevel');
end;
function TfrxBevelControl.GetBevelShape:TBevelShape;
begin
Result:= FBevel.Shape;
end;
function TfrxBevelControl.GetBevelStyle:TBevelStyle;
begin
Result:= FBevel.Style;
end;
procedure TfrxBevelControl.SetBevelShape(const Value:TBevelShape);
begin
FBevel.Shape:= Value;
end;
procedure TfrxBevelControl.SetBevelStyle(const Value:TBevelStyle);
begin
FBevel.Style:= Value;
end;
{ TfrxPanelControl }
constructor TfrxPanelControl.Create(AOwner:TComponent);
begin
inherited;
FPanel:= TPanel.Create(nil);
InitControl(FPanel);
Width:= 185;
Height:= 41;
end;
class function TfrxPanelControl.GetDescription:String;
begin
Result:= frxResources.Get('obPanel');
end;
function TfrxPanelControl.GetAlignment:TAlignment;
begin
Result:= FPanel.Alignment;
end;
function TfrxPanelControl.GetBevelInner:TPanelBevel;
begin
Result:= FPanel.BevelInner;
end;
function TfrxPanelControl.GetBevelOuter:TPanelBevel;
begin
Result:= FPanel.BevelOuter;
end;
function TfrxPanelControl.GetBevelWidth:Integer;
begin
Result:= FPanel.BevelWidth;
end;
procedure TfrxPanelControl.SetAlignment(const Value:TAlignment);
begin
FPanel.Alignment:= Value;
end;
procedure TfrxPanelControl.SetBevelInner(const Value:TPanelBevel);
begin
FPanel.BevelInner:= Value;
end;
procedure TfrxPanelControl.SetBevelOuter(const Value:TPanelBevel);
begin
FPanel.BevelOuter:= Value;
end;
procedure TfrxPanelControl.SetBevelWidth(const Value:Integer);
begin
FPanel.BevelWidth:= Value;
end;
{ TfrxGroupBoxControl }
constructor TfrxGroupBoxControl.Create(AOwner:TComponent);
begin
inherited;
FGroupBox:= TGroupBox.Create(nil);
InitControl(FGroupBox);
Width:= 185;
Height:= 105;
end;
class function TfrxGroupBoxControl.GetDescription:String;
begin
Result:= frxResources.Get('obGrBox');
end;
{ TfrxBitBtnControl }
constructor TfrxBitBtnControl.Create(AOwner:TComponent);
begin
inherited;
FBitBtn:= TBitBtn.Create(nil);
InitControl(FBitBtn);
Width:= 75;
Height:= 25;
end;
class function TfrxBitBtnControl.GetDescription:String;
begin
Result:= frxResources.Get('obBBtn');
end;
function TfrxBitBtnControl.GetGlyph:TBitmap;
begin
Result:= FBitBtn.Glyph;
end;
function TfrxBitBtnControl.GetKind:TBitBtnKind;
begin
Result:= FBitBtn.Kind;
end;
function TfrxBitBtnControl.GetLayout:TButtonLayout;
begin
Result:= FBitBtn.Layout;
end;
function TfrxBitBtnControl.GetMargin:Integer;
begin
Result:= FBitBtn.Margin;
end;
function TfrxBitBtnControl.GetModalResult:TModalResult;
begin
Result:= FBitBtn.ModalResult;
end;
function TfrxBitBtnControl.GetNumGlyphs:Integer;
begin
Result:= FBitBtn.NumGlyphs;
end;
function TfrxBitBtnControl.GetSpacing:Integer;
begin
Result:= FBitBtn.Spacing;
end;
procedure TfrxBitBtnControl.SetGlyph(const Value:TBitmap);
begin
FBitBtn.Glyph:= Value;
end;
procedure TfrxBitBtnControl.SetKind(const Value:TBitBtnKind);
begin
FBitBtn.Kind:= Value;
end;
procedure TfrxBitBtnControl.SetLayout(const Value:TButtonLayout);
begin
FBitBtn.Layout:= Value;
end;
procedure TfrxBitBtnControl.SetMargin(const Value:Integer);
begin
FBitBtn.Margin:= Value;
end;
procedure TfrxBitBtnControl.SetModalResult(const Value:TModalResult);
begin
FBitBtn.ModalResult:= Value;
end;
procedure TfrxBitBtnControl.SetNumGlyphs(const Value:Integer);
begin
FBitBtn.NumGlyphs:= Value;
end;
procedure TfrxBitBtnControl.SetSpacing(const Value:Integer);
begin
FBitBtn.Spacing:= Value;
end;
{ TfrxSpeedButtonControl }
constructor TfrxSpeedButtonControl.Create(AOwner:TComponent);
begin
inherited;
FSpeedButton:= TSpeedButton.Create(nil);
InitControl(FSpeedButton);
Width:= 22;
Height:= 22;
end;
class function TfrxSpeedButtonControl.GetDescription:String;
begin
Result:= frxResources.Get('obSBtn');
end;
function TfrxSpeedButtonControl.GetAllowAllUp:Boolean;
begin
Result:= FSpeedButton.AllowAllUp;
end;
function TfrxSpeedButtonControl.GetDown:Boolean;
begin
Result:= FSpeedButton.Down;
end;
function TfrxSpeedButtonControl.GetFlat:Boolean;
begin
Result:= FSpeedButton.Flat;
end;
function TfrxSpeedButtonControl.GetGlyph:TBitmap;
begin
Result:= FSpeedButton.Glyph;
end;
function TfrxSpeedButtonControl.GetGroupIndex:Integer;
begin
Result:= FSpeedButton.GroupIndex;
end;
function TfrxSpeedButtonControl.GetHint:String;
begin
Result:= FSpeedButton.Hint;
end;
function TfrxSpeedButtonControl.GetLayout:TButtonLayout;
begin
Result:= FSpeedButton.Layout;
end;
function TfrxSpeedButtonControl.GetMargin:Integer;
begin
Result:= FSpeedButton.Margin;
end;
function TfrxSpeedButtonControl.GetSpacing:Integer;
begin
Result:= FSpeedButton.Spacing;
end;
procedure TfrxSpeedButtonControl.SetAllowAllUp(const Value:Boolean);
begin
FSpeedButton.AllowAllUp:= Value;
end;
procedure TfrxSpeedButtonControl.SetDown(const Value:Boolean);
begin
FSpeedButton.Down:= Value;
end;
procedure TfrxSpeedButtonControl.SetFlat(const Value:Boolean);
begin
FSpeedButton.Flat:= Value;
end;
procedure TfrxSpeedButtonControl.SetGlyph(const Value:TBitmap);
begin
FSpeedButton.Glyph:= Value;
end;
procedure TfrxSpeedButtonControl.SetGroupIndex(const Value:Integer);
begin
FSpeedButton.GroupIndex:= Value;
end;
procedure TfrxSpeedButtonControl.SetHint(const Value:String);
begin
FSpeedButton.Hint:= Value;
end;
procedure TfrxSpeedButtonControl.SetLayout(const Value:TButtonLayout);
begin
FSpeedButton.Layout:= Value;
end;
procedure TfrxSpeedButtonControl.SetMargin(const Value:Integer);
begin
FSpeedButton.Margin:= Value;
end;
procedure TfrxSpeedButtonControl.SetSpacing(const Value:Integer);
begin
FSpeedButton.Spacing:= Value;
end;
{ TfrxMaskEditControl }
constructor TfrxMaskEditControl.Create(AOwner:TComponent);
begin
FMaskEdit:= TMaskEdit.Create(nil);
FCustomEdit:= FMaskEdit;
inherited;
Width:= 121;
Height:= 21;
end;
class function TfrxMaskEditControl.GetDescription:String;
begin
Result:= frxResources.Get('obMEdit');
end;
function TfrxMaskEditControl.GetEditMask:String;
begin
Result:= FMaskEdit.EditMask;
end;
procedure TfrxMaskEditControl.SetEditMask(const Value:String);
begin
FMaskEdit.EditMask:= Value;
end;
{ TfrxCheckListBoxControl }
constructor TfrxCheckListBoxControl.Create(AOwner:TComponent);
begin
inherited;
FCheckListBox:= TCheckListBox.Create(nil);
InitControl(FCheckListBox);
Width:= 121;
Height:= 97;
end;
class function TfrxCheckListBoxControl.GetDescription:String;
begin
Result:= frxResources.Get('obChLB');
end;
function TfrxCheckListBoxControl.GetAllowGrayed:Boolean;
begin
Result:= FCheckListBox.AllowGrayed;
end;
function TfrxCheckListBoxControl.GetItems:TStrings;
begin
Result:= FCheckListBox.Items;
end;
function TfrxCheckListBoxControl.GetSorted:Boolean;
begin
Result:= FCheckListBox.Sorted;
end;
function TfrxCheckListBoxControl.GetChecked(Index:Integer):Boolean;
begin
Result:= FCheckListBox.Checked[Index];
end;
function TfrxCheckListBoxControl.GetState(Index:Integer):TCheckBoxState;
begin
Result:= FCheckListBox.State[Index];
end;
procedure TfrxCheckListBoxControl.SetAllowGrayed(const Value:Boolean);
begin
FCheckListBox.AllowGrayed:= Value;
end;
procedure TfrxCheckListBoxControl.SetItems(const Value:TStrings);
begin
FCheckListBox.Items:= Value;
end;
procedure TfrxCheckListBoxControl.SetSorted(const Value:Boolean);
begin
FCheckListBox.Sorted:= Value;
end;
procedure TfrxCheckListBoxControl.SetChecked(Index:Integer; const Value:Boolean);
begin
FCheckListBox.Checked[Index]:= Value;
end;
procedure TfrxCheckListBoxControl.SetState(Index:Integer; const Value:TCheckBoxState);
begin
FCheckListBox.State[Index]:= Value;
end;
initialization
frxObjects.RegisterCategory('Other controls', nil, 'obCatOtherControls', 21);
frxObjects.RegisterObject1(TfrxLabelControl, nil, '', '', 0, 12);
frxObjects.RegisterObject1(TfrxEditControl, nil, '', '', 0, 13);
frxObjects.RegisterObject1(TfrxMemoControl, nil, '', '', 0, 14);
frxObjects.RegisterObject1(TfrxButtonControl, nil, '', '', 0, 15);
frxObjects.RegisterObject1(TfrxCheckBoxControl, nil, '', '', 0, 16);
frxObjects.RegisterObject1(TfrxRadioButtonControl, nil, '', '', 0, 17);
frxObjects.RegisterObject1(TfrxListBoxControl, nil, '', '', 0, 18);
frxObjects.RegisterObject1(TfrxComboBoxControl, nil, '', '', 0, 19);
frxObjects.RegisterObject1(TfrxPanelControl, nil, '', '', 0, 44);
frxObjects.RegisterObject1(TfrxGroupBoxControl, nil, '', '', 0, 43);
frxObjects.RegisterObject1(TfrxDateEditControl, nil, '', 'Other controls', 0, 20);
frxObjects.RegisterObject1(TfrxImageControl, nil, '', 'Other controls', 0, 3);
frxObjects.RegisterObject1(TfrxBevelControl, nil, '', 'Other controls', 0, 33);
frxObjects.RegisterObject1(TfrxBitBtnControl, nil, '', 'Other controls', 0, 45);
frxObjects.RegisterObject1(TfrxSpeedButtonControl, nil, '', 'Other controls', 0, 46);
frxObjects.RegisterObject1(TfrxMaskEditControl, nil, '', 'Other controls', 0, 47);
frxObjects.RegisterObject1(TfrxCheckListBoxControl, nil, '', 'Other controls', 0, 48);
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -