You've already forked lazarus-ccr
jvcllaz: Activate showing several weeks in the week calendar of TvTimeFrame demo.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7118 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -22,11 +22,12 @@ object MainForm: TMainForm
|
||||
Height = 515
|
||||
Top = 73
|
||||
Width = 477
|
||||
ActivePage = TabSheet1
|
||||
ActivePage = pgMonths
|
||||
Align = alClient
|
||||
TabIndex = 0
|
||||
TabIndex = 2
|
||||
TabOrder = 0
|
||||
object TabSheet1: TTabSheet
|
||||
OnChange = PageControl1Change
|
||||
object pgDays: TTabSheet
|
||||
Caption = 'Day View'
|
||||
ClientHeight = 487
|
||||
ClientWidth = 469
|
||||
@ -43,7 +44,6 @@ object MainForm: TMainForm
|
||||
Template.LinearEndDate = 36406
|
||||
Template.LinearStartDate = 36406
|
||||
Grouping = grNone
|
||||
GroupHdrHeight = 28
|
||||
GridStartTime = 0
|
||||
GridEndTime = 0
|
||||
TimeBlocks = <>
|
||||
@ -105,7 +105,7 @@ object MainForm: TMainForm
|
||||
OnDblClick = JvTFDays1DblClick
|
||||
end
|
||||
end
|
||||
object TabSheet2: TTabSheet
|
||||
object pgWeeks: TTabSheet
|
||||
Caption = 'Week View'
|
||||
ClientHeight = 487
|
||||
ClientWidth = 469
|
||||
@ -162,6 +162,7 @@ object MainForm: TMainForm
|
||||
TitleAttr.Title = 'Week of Jan 14, 2002'
|
||||
CellAttr.Font.Color = clWindowText
|
||||
CellAttr.FrameAttr.Color = clGray
|
||||
CellAttr.TitleAttr.FrameAttr.Style = fsNone
|
||||
CellAttr.TitleAttr.FrameAttr.Color = clGray
|
||||
CellAttr.TitleAttr.DayTxtAttr.Font.Color = clWindowText
|
||||
CellAttr.TitleAttr.DayTxtAttr.Font.Style = [fsBold]
|
||||
@ -192,7 +193,7 @@ object MainForm: TMainForm
|
||||
DWTitleAttr.TxtAttr.Font.Style = [fsBold]
|
||||
end
|
||||
end
|
||||
object TabSheet3: TTabSheet
|
||||
object pgMonths: TTabSheet
|
||||
Caption = 'Month View'
|
||||
ClientHeight = 487
|
||||
ClientWidth = 469
|
||||
@ -902,6 +903,23 @@ object MainForm: TMainForm
|
||||
Spacing = 0
|
||||
TabOrder = 14
|
||||
end
|
||||
object WeeksCombo: TComboBox
|
||||
Left = 351
|
||||
Height = 23
|
||||
Top = 48
|
||||
Width = 100
|
||||
ItemHeight = 15
|
||||
Items.Strings = (
|
||||
'1 week'
|
||||
'2 weeks'
|
||||
'3 weeks'
|
||||
'4 weeks'
|
||||
)
|
||||
OnChange = WeeksComboChange
|
||||
Style = csDropDownList
|
||||
TabOrder = 15
|
||||
Visible = False
|
||||
end
|
||||
end
|
||||
object Panel2: TPanel
|
||||
Left = 0
|
||||
@ -1697,8 +1715,6 @@ object MainForm: TMainForm
|
||||
PrimeTime.EndTime = 0.708333333333333
|
||||
PrimeTime.Color = clYellow
|
||||
RowHdrType = rhGrid
|
||||
RowHdrWidth = 0
|
||||
RowHeight = 0
|
||||
ShowPics = False
|
||||
ShowText = False
|
||||
TimeFormat = 't'
|
||||
|
@ -46,6 +46,7 @@ type
|
||||
{ TMainForm }
|
||||
|
||||
TMainForm = class(TForm)
|
||||
WeeksCombo: TComboBox;
|
||||
ImageList: TImageList;
|
||||
JvTFDaysPrinter1: TJvTFDaysPrinter;
|
||||
IconsProvidedLabel: TLabel;
|
||||
@ -62,9 +63,9 @@ type
|
||||
DeleteApptQuery: TSQLQuery;
|
||||
SchedulesQuery: TSQLQuery;
|
||||
PageControl1: TPageControl;
|
||||
TabSheet1: TTabSheet;
|
||||
TabSheet2: TTabSheet;
|
||||
TabSheet3: TTabSheet;
|
||||
pgDays: TTabSheet;
|
||||
pgWeeks: TTabSheet;
|
||||
pgMonths: TTabSheet;
|
||||
JvTFDays1: TJvTFDays;
|
||||
JvTFWeeks1: TJvTFWeeks;
|
||||
JvTFMonths1: TJvTFMonths;
|
||||
@ -94,6 +95,7 @@ type
|
||||
procedure IconsLinkMouseLeave(Sender: TObject);
|
||||
|
||||
procedure ModeComboChange(Sender: TObject);
|
||||
procedure PageControl1Change(Sender: TObject);
|
||||
procedure SettingsButtonClick(Sender: TObject);
|
||||
procedure ViewSchedsButtonClick(Sender: TObject);
|
||||
procedure HideSchedButtonClick(Sender: TObject);
|
||||
@ -133,6 +135,7 @@ type
|
||||
procedure FormShow(Sender: TObject);
|
||||
|
||||
procedure PrintButtonClick(Sender: TObject);
|
||||
procedure WeeksComboChange(Sender: TObject);
|
||||
|
||||
private
|
||||
{ Private declarations }
|
||||
@ -320,6 +323,11 @@ begin
|
||||
VisibleResources.ShowModal;
|
||||
end;
|
||||
|
||||
procedure TMainForm.WeeksComboChange(Sender: TObject);
|
||||
begin
|
||||
JvTFWeeks1.WeekCount := WeeksCombo.ItemIndex + 1;
|
||||
end;
|
||||
|
||||
procedure TMainForm.HideSchedButtonClick(Sender: TObject);
|
||||
var
|
||||
I,
|
||||
@ -414,6 +422,13 @@ begin
|
||||
JvTFWeeks1.DisplayDate := JvTFDays1.CurrentDate;
|
||||
end;
|
||||
|
||||
procedure TMainForm.PageControl1Change(Sender: TObject);
|
||||
begin
|
||||
WeeksCombo.BoundsRect := DaysCombo.BoundsRect;
|
||||
WeeksCombo.Visible := PageControl1.ActivePage = pgWeeks;
|
||||
DaysCombo.Visible := PageControl1.ActivePage = pgDays;
|
||||
end;
|
||||
|
||||
procedure TMainForm.GotoDatePickerChange(Sender: TObject);
|
||||
begin
|
||||
// GotoDatePicker.OnCloseUp should also point to this handler
|
||||
@ -779,11 +794,13 @@ var
|
||||
begin
|
||||
ini := TMemIniFile.Create(ChangeFileExt(Application.ExeName, '.ini'));
|
||||
try
|
||||
PageControl1.ActivePageIndex := ini.ReadInteger('MainForm', 'PageIndex', 0);
|
||||
|
||||
ModeCombo.ItemIndex := ini.ReadInteger('MainForm', 'ModeCombo', 0);
|
||||
TimeIncCombo.ItemIndex := ini.ReadInteger('MainForm', 'TimeIncCombo', 1);
|
||||
DaysCombo.ItemIndex := ini.ReadInteger('MainForm', 'DaysCombo', 0);
|
||||
WeeksCombo.ItemIndex := ini.ReadInteger('MainForm', 'WeeksCombo', 0);
|
||||
|
||||
PageControl1.ActivePageIndex := ini.ReadInteger('MainForm', 'PageIndex', 0);
|
||||
PageControl1Change(nil);
|
||||
|
||||
GlobalSettings.Hr2400 := ini.ReadBool('Settings', 'Hr2400', GlobalSettings.Hr2400);
|
||||
GlobalSettings.FirstDayOfWeek := TTFDayofWeek(ini.ReadInteger('Settings', 'FirstDayOfWeek', ord(GlobalSettings.FirstDayOfWeek)));
|
||||
@ -807,6 +824,7 @@ begin
|
||||
ini.WriteInteger('MainForm', 'ModeCombo', ModeCombo.ItemIndex);
|
||||
ini.WriteInteger('MainForm', 'TimeIncCombo', TimeIncCombo.ItemIndex);
|
||||
ini.WriteInteger('MainForm', 'DaysCombo', DaysCombo.ItemIndex);
|
||||
ini.WriteInteger('MainForm', 'WeeksCombo', WeeksCombo.ItemIndex);
|
||||
|
||||
ini.WriteBool('Settings', 'Hr2400', GlobalSettings.Hr2400);
|
||||
ini.WriteInteger('Settings', 'FirstDayOfWeek', ord(GlobalSettings.FirstDayOfWeek));
|
||||
|
Reference in New Issue
Block a user