summaryrefslogtreecommitdiff
path: root/src/gui/gui_popupcalendar.pas
diff options
context:
space:
mode:
authorgraemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2008-04-11 12:56:25 +0000
committergraemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2008-04-11 12:56:25 +0000
commit2bcdcddcfd88233bceb4838ee8c58ee991003cea (patch)
tree02e6336c6b8bceef30af50e00871cfa34eadd0ce /src/gui/gui_popupcalendar.pas
parent95b760d80613d0873a9ed92e4bf29f1ef9b27564 (diff)
downloadfpGUI-2bcdcddcfd88233bceb4838ee8c58ee991003cea.tar.xz
* Implemented OnClose event for TfpgPopupWindow
* Implemented OnDropDown and OnCloseUp for any combobox type component. * TfpgCombobox.FocusItem can now be set via code without the OnChange event firing (default). This behaviour can be modified with the TfpgComboBox.Options property.
Diffstat (limited to 'src/gui/gui_popupcalendar.pas')
-rw-r--r--src/gui/gui_popupcalendar.pas11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/gui/gui_popupcalendar.pas b/src/gui/gui_popupcalendar.pas
index a70d5a6f..1fcfb44b 100644
--- a/src/gui/gui_popupcalendar.pas
+++ b/src/gui/gui_popupcalendar.pas
@@ -148,6 +148,8 @@ type
property CloseOnSelect: boolean read FCloseOnSelect write SetCloseOnSelect default True;
property TabOrder;
property OnChange;
+ property OnCloseUp;
+ property OnDropDown;
end;
{@VFD_NEWFORM_DECL}
@@ -334,7 +336,7 @@ end;
procedure TfpgPopupCalendar.SetCloseOnSelect(const AValue: boolean);
begin
if FCloseOnSelect = AValue then
- exit;
+ Exit;
FCloseOnSelect := AValue;
end;
@@ -755,7 +757,7 @@ begin
on E: Exception do
begin
FDateFormat := OldFormat;
- ShowMessage(E.Message);
+ fpgApplication.HandleException(self);
end;
end;
end;
@@ -772,6 +774,10 @@ begin
{ Set to false CloseOnSelect to leave opened popup calendar menu}
ddw.CloseOnSelect := CloseOnSelect;
ddw.CallerWidget := self;
+
+ if Assigned(OnDropDown) then
+ OnDropDown(self);
+
ddw.MinDate := FMinDate;
ddw.MaxDate := FMaxDate;
ddw.DateValue := FDate;
@@ -781,6 +787,7 @@ begin
ddw.UpdateCalendar; //slapshot
ddw.PopupFrame := True;
ddw.OnValueSet := @InternalOnValueSet;
+ ddw.OnClose := @InternalOnClose;
end
else
begin