diff options
author | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2008-04-11 12:56:25 +0000 |
---|---|---|
committer | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2008-04-11 12:56:25 +0000 |
commit | 2bcdcddcfd88233bceb4838ee8c58ee991003cea (patch) | |
tree | 02e6336c6b8bceef30af50e00871cfa34eadd0ce /src/gui/gui_editcombo.pas | |
parent | 95b760d80613d0873a9ed92e4bf29f1ef9b27564 (diff) | |
download | fpGUI-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_editcombo.pas')
-rw-r--r-- | src/gui/gui_editcombo.pas | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gui/gui_editcombo.pas b/src/gui/gui_editcombo.pas index dad8449f..fee9ec70 100644 --- a/src/gui/gui_editcombo.pas +++ b/src/gui/gui_editcombo.pas @@ -129,6 +129,8 @@ type property TextColor; property Width; property OnChange; + property OnCloseUp; + property OnDropDown; end; @@ -359,6 +361,11 @@ begin ddw.DontCloseWidget := self; // now we can control when the popup window closes r := GetDropDownPos(Parent, self, ddw); ddw.Height := r.Height; + + if (FItems.Count > 0) and Assigned(OnDropDown) then + OnDropDown(self); + ddw.OnClose := @InternalOnClose; + ddw.ShowAt(Parent, r.Left, r.Top); end else |