diff options
author | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2010-06-07 10:52:37 +0200 |
---|---|---|
committer | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2010-06-07 10:52:37 +0200 |
commit | 9fc3070cec35073db340cfc5b836ceae05ea99c8 (patch) | |
tree | b8e7ca579c18111ca46c7d383768633946734e0e | |
parent | d02f740d22c41da3af2a82b495618c3d6027d6f6 (diff) | |
download | fpGUI-9fc3070cec35073db340cfc5b836ceae05ea99c8.tar.xz |
ListBox: Items.Assign() now correctly updates scrollbar status.
-rw-r--r-- | src/gui/fpg_listbox.pas | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/gui/fpg_listbox.pas b/src/gui/fpg_listbox.pas index 613fc092..4b6d162e 100644 --- a/src/gui/fpg_listbox.pas +++ b/src/gui/fpg_listbox.pas @@ -229,6 +229,7 @@ type procedure Delete(Index: Integer); override; procedure Clear; override; procedure Exchange(Index1, Index2: Integer); override; + procedure Assign(Source: TPersistent); override; end; @@ -302,6 +303,18 @@ begin end; end; +procedure TfpgListBoxStrings.Assign(Source: TPersistent); +begin + inherited Assign(Source); + if UpdateCount > 0 then + Exit; + if Assigned(ListBox) and (ListBox.HasHandle) then + begin + ListBox.UpdateScrollBar; + ListBox.Invalidate; + end; +end; + { TfpgBaseListBox } |