diff options
author | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2007-10-08 17:38:00 +0000 |
---|---|---|
committer | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2007-10-08 17:38:00 +0000 |
commit | 63225c5058cd4739cc55839f49f72c69992f909e (patch) | |
tree | f12f827b78be6ab85c90bfcd494b850cf8c13936 /src/gui | |
parent | f2e764149fb7bf9f6a3886906c64c27cd745a457 (diff) | |
download | fpGUI-63225c5058cd4739cc55839f49f72c69992f909e.tar.xz |
* UI Designer: Fixed the issue with scrolling in the property window and the active property editor doesn't scroll along.
* Added a new event OnScroll to the TfpgBaseListBox
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/gui_listbox.pas | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gui/gui_listbox.pas b/src/gui/gui_listbox.pas index c35be4bf..64055937 100644 --- a/src/gui/gui_listbox.pas +++ b/src/gui/gui_listbox.pas @@ -47,6 +47,7 @@ type private FHotTrack: boolean; FOnChange: TNotifyEvent; + FOnScroll: TNotifyEvent; FOnSelect: TNotifyEvent; FPopupFrame: boolean; function GetFontDesc: string; @@ -68,7 +69,7 @@ type function ListHeight: TfpgCoord; function ScrollBarWidth: TfpgCoord; function PageLength: integer; - procedure ScrollBarMove(Sender: TObject; position : integer); + procedure ScrollBarMove(Sender: TObject; position: integer); procedure DrawItem(num: integer; rect: TfpgRect; flags: integer); virtual; procedure DoChange; procedure DoSelect; @@ -92,6 +93,7 @@ type property Font: TfpgFont read FFont; property OnChange: TNotifyEvent read FOnChange write FOnChange; property OnSelect: TNotifyEvent read FOnSelect write FOnSelect; + property OnScroll: TNotifyEvent read FOnScroll write FOnScroll; end; @@ -287,6 +289,8 @@ procedure TfpgBaseListBox.ScrollBarMove(Sender: TObject; position: integer); begin FFirstItem := position; Repaint; + if Assigned(FOnScroll) then + FOnScroll(self); end; procedure TfpgBaseListBox.DoChange; @@ -590,6 +594,7 @@ begin FOnChange := nil; FOnSelect := nil; + FOnScroll := nil; end; destructor TfpgBaseListBox.Destroy; |