You've already forked lazarus-ccr
tvplanit: Disable day offset parameters when not needed by element in VpEdElem
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@8511 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -388,8 +388,10 @@ resourcestring
|
||||
{ Print Format Item Editor }
|
||||
RSEditFormatCaption = 'Edit format';
|
||||
RSNameLbl = 'Name:';
|
||||
RSTimeIncLbl = 'Time increment:';
|
||||
RSTimeIncUnits = 'Time increment units:';
|
||||
RSDayIncLbl = 'Day increment:';
|
||||
RSDayIncUnits = 'Day increment units';
|
||||
RSDayOffsetCaption = 'Day offset';
|
||||
RSDayOffsetUnits = 'Day offset units';
|
||||
|
||||
{ Format element editor }
|
||||
RSEditElementCaption = 'Edit element';
|
||||
@ -413,7 +415,7 @@ resourcestring
|
||||
RSWidth = 'Width';
|
||||
RSHeight = 'Height';
|
||||
RSVisible = 'Visible';
|
||||
RSCaption = 'Caption';
|
||||
RSCaptionLbl = 'Caption:';
|
||||
RSTextCaption = 'Text';
|
||||
RSShapeBtn = 'Shape...';
|
||||
RSFontBtn = 'Font...';
|
||||
|
@ -463,7 +463,7 @@ object frmEditElement: TfrmEditElement
|
||||
TabOrder = 0
|
||||
end
|
||||
end
|
||||
object Panel2: TPanel
|
||||
object DayOffsetPanel: TPanel
|
||||
Left = 12
|
||||
Height = 51
|
||||
Top = 152
|
||||
@ -478,7 +478,7 @@ object frmEditElement: TfrmEditElement
|
||||
ClientWidth = 451
|
||||
TabOrder = 2
|
||||
object gbDayOffset: TGroupBox
|
||||
AnchorSideTop.Control = Panel2
|
||||
AnchorSideTop.Control = DayOffsetPanel
|
||||
AnchorSideBottom.Control = rgDayOffsetUnit
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 0
|
||||
@ -528,7 +528,7 @@ object frmEditElement: TfrmEditElement
|
||||
object rgDayOffsetUnit: TRadioGroup
|
||||
AnchorSideLeft.Control = gbDayOffset
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideRight.Control = Panel2
|
||||
AnchorSideRight.Control = DayOffsetPanel
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 108
|
||||
Height = 51
|
||||
|
@ -56,7 +56,7 @@ type
|
||||
gbDayOffset: TGroupBox;
|
||||
lblName: TLabel;
|
||||
Panel1: TPanel;
|
||||
Panel2: TPanel;
|
||||
DayOffsetPanel: TPanel;
|
||||
ButtonPanel: TPanel;
|
||||
ItemTypePanel: TPanel;
|
||||
HeightWidthPanel: TPanel;
|
||||
@ -282,8 +282,8 @@ begin
|
||||
rgItemType.Items[6] := RSTasksElement;
|
||||
rgItemType.Items[7] := RSContactsElement;
|
||||
|
||||
gbDayOffset.Caption := RSTimeIncLbl;
|
||||
rgDayOffsetUnit.Caption := RSTimeIncUnits;
|
||||
gbDayOffset.Caption := RSDayOffsetCaption;
|
||||
rgDayOffsetUnit.Caption := RSDayOffsetUnits;
|
||||
rgDayOffsetUnit.Items[0] := RSDays;
|
||||
rgDayOffsetUnit.Items[1] := RSWeeks;
|
||||
rgDayOffsetUnit.Items[2] := RSMonths;
|
||||
@ -301,7 +301,7 @@ begin
|
||||
lblHeight.Caption := RSHeight;
|
||||
chkVisible.Caption := RSVisible;
|
||||
|
||||
gbCaption.Caption := RSCaption;
|
||||
gbCaption.Caption := RSCaptionLbl;
|
||||
lblCaptionText.Caption := RSTextCaption;
|
||||
btnCaptionFont.Caption := RSFontBtn;
|
||||
btnShape.Caption := RSShapeBtn;
|
||||
@ -354,15 +354,20 @@ begin
|
||||
end;
|
||||
|
||||
procedure TfrmEditElement.SetItemType(Index : Integer);
|
||||
var
|
||||
itemType: TVpItemType;
|
||||
begin
|
||||
rgItemType.ItemIndex := Index;
|
||||
itemType := TVpItemType(Index);
|
||||
|
||||
btnShape.Enabled := TVpItemType(Index) = itShape;
|
||||
btnShape.Enabled := itemType = itShape;
|
||||
|
||||
gbCaption.Enabled := TVpItemType(Index) = itCaption;
|
||||
gbCaption.Enabled := itemType = itCaption;
|
||||
edCaptionText.Enabled := gbCaption.Enabled;
|
||||
lblCaptionText.Enabled := gbCaption.Enabled;
|
||||
btnCaptionFont.Enabled := gbCaption.Enabled;
|
||||
|
||||
DayOffsetPanel.Enabled := itemType in [itDayView, itWeekView, itMonthView, itCalendar];
|
||||
end;
|
||||
|
||||
procedure TfrmEditElement.SetMaxSpin(Spin : Integer);
|
||||
|
@ -144,8 +144,8 @@ begin
|
||||
Caption := RSEditFormatCaption;
|
||||
LblName.Caption := RSNameLbl;
|
||||
LblDescription.Caption := RSDescriptionLbl;
|
||||
LblIncrement.Caption := RsTimeIncLbl;
|
||||
rgDayIncrement.Caption := RsTimeIncUnits;
|
||||
LblIncrement.Caption := RSDayIncLbl;
|
||||
rgDayIncrement.Caption := RsDayIncUnits;
|
||||
rgDayIncrement.Items[0] := RSDays;
|
||||
rgDayIncrement.Items[1] := RSWeeks;
|
||||
rgDayIncrement.Items[2] := RSMonths;
|
||||
|
Reference in New Issue
Block a user