You've already forked lazarus-ccr
tvplanit: Make VpDayView's new property ShowNavButtons work at designtime.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6417 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -327,7 +327,7 @@ end;
|
|||||||
procedure TfrmNavBarEd.FormShow(Sender: TObject);
|
procedure TfrmNavBarEd.FormShow(Sender: TObject);
|
||||||
var
|
var
|
||||||
delta: Integer;
|
delta: Integer;
|
||||||
h: Integer;
|
h: Integer = 0;
|
||||||
begin
|
begin
|
||||||
PopulateImagesList;
|
PopulateImagesList;
|
||||||
delta := lbFolders.Left;
|
delta := lbFolders.Left;
|
||||||
@ -599,7 +599,9 @@ procedure TfrmNavBarEd.lbItemsMeasureItem(Control: TWinControl;
|
|||||||
begin
|
begin
|
||||||
Unused(Control, Index);
|
Unused(Control, Index);
|
||||||
if (FBar <> nil) and (Bar.Images <> nil) then
|
if (FBar <> nil) and (Bar.Images <> nil) then
|
||||||
Height := Bar.Images.Height + 2 * vITEMS_MARGIN;
|
Height := Bar.Images.Height + 2 * vITEMS_MARGIN
|
||||||
|
else
|
||||||
|
Height := lbItems.ItemHeight;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmNavBarEd.lbItemsDrawItem(Control: TWinControl;
|
procedure TfrmNavBarEd.lbItemsDrawItem(Control: TWinControl;
|
||||||
|
@ -1125,6 +1125,16 @@ begin
|
|||||||
dvWeekUpBtn.Visible := FShowNavButtons;
|
dvWeekUpBtn.Visible := FShowNavButtons;
|
||||||
dvWeekDownBtn.Visible := FShowNavButtons;
|
dvWeekDownBtn.Visible := FShowNavButtons;
|
||||||
|
|
||||||
|
{ In order to hide the nav btns in designmode move them out of their parent }
|
||||||
|
if (csDesigning in ComponentState) and not FShowNavButtons then begin
|
||||||
|
dvTodayBtn.Left := -Width;
|
||||||
|
dvWeekDownBtn.Left := -Width;
|
||||||
|
dvWeekUpBtn.Left := -Width;
|
||||||
|
dvDayDownBtn.Left := -Width;
|
||||||
|
dvDayUpBtn.Left := -Width;
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
|
||||||
{ Calculate width of buttons }
|
{ Calculate width of buttons }
|
||||||
dvTodayBtn.Height := trunc(RealColHeadHeight div 2);
|
dvTodayBtn.Height := trunc(RealColHeadHeight div 2);
|
||||||
dvTodayBtn.Width := RealRowHeadWidth;
|
dvTodayBtn.Width := RealRowHeadWidth;
|
||||||
|
Reference in New Issue
Block a user