diff options
author | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2010-06-04 14:51:19 +0200 |
---|---|---|
committer | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2010-06-04 14:51:19 +0200 |
commit | d02f740d22c41da3af2a82b495618c3d6027d6f6 (patch) | |
tree | 525008e72de8032d6406a65af705a6fe4a7c8039 | |
parent | 7550965fe9d03a2a81583e091fbe1bd8d71aa09d (diff) | |
download | fpGUI-d02f740d22c41da3af2a82b495618c3d6027d6f6.tar.xz |
ListBox: internal Items.Exchange now notifies the listbox to redraw.
-rw-r--r-- | src/gui/fpg_listbox.pas | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/gui/fpg_listbox.pas b/src/gui/fpg_listbox.pas index 175f0055..613fc092 100644 --- a/src/gui/fpg_listbox.pas +++ b/src/gui/fpg_listbox.pas @@ -228,6 +228,7 @@ type function Add(const s: String): Integer; override; procedure Delete(Index: Integer); override; procedure Clear; override; + procedure Exchange(Index1, Index2: Integer); override; end; @@ -290,6 +291,17 @@ begin ListBox.Invalidate; end; +procedure TfpgListBoxStrings.Exchange(Index1, Index2: Integer); +begin + inherited Exchange(Index1, Index2); + if UpdateCount > 0 then + Exit; + if Assigned(ListBox) and (ListBox.HasHandle) then + begin + ListBox.Invalidate; + end; +end; + { TfpgBaseListBox } |