From 63225c5058cd4739cc55839f49f72c69992f909e Mon Sep 17 00:00:00 2001 From: graemeg Date: Mon, 8 Oct 2007 17:38:00 +0000 Subject: * 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 --- src/gui/gui_listbox.pas | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/gui') 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; -- cgit v1.2.3-70-g09d2