summaryrefslogtreecommitdiff
path: root/src/gui/fpg_listbox.pas
diff options
context:
space:
mode:
authorGraeme Geldenhuys <graeme@mastermaths.co.za>2012-08-23 10:29:56 +0100
committerGraeme Geldenhuys <graeme@mastermaths.co.za>2012-08-23 10:29:56 +0100
commit9382275db30e80653abc1a3fe1b23004df2cdef8 (patch)
treebef75e715645cc0ace078f47fe5eff1002636526 /src/gui/fpg_listbox.pas
parent7ad89954caa49e53b249c20ae38af0216db848ed (diff)
downloadfpGUI-9382275db30e80653abc1a3fe1b23004df2cdef8.tar.xz
listbox: Rather use BeginUpdate..EndUpdate
This will call UpdateScrollBar and Repaint anyways.
Diffstat (limited to 'src/gui/fpg_listbox.pas')
-rw-r--r--src/gui/fpg_listbox.pas4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/fpg_listbox.pas b/src/gui/fpg_listbox.pas
index a0cb8e93..bbcd4530 100644
--- a/src/gui/fpg_listbox.pas
+++ b/src/gui/fpg_listbox.pas
@@ -310,9 +310,9 @@ begin
inherited Clear;
if UpdateCount > 0 then
Exit;
+ ListBox.BeginUpdate;
ListBox.FocusItem := -1;
- ListBox.UpdateScrollBar;
- ListBox.Invalidate;
+ ListBox.EndUpdate;
end;
procedure TfpgListBoxStrings.Exchange(Index1, Index2: Integer);