summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGraeme Geldenhuys <graemeg@gmail.com>2009-10-12 20:31:16 +0200
committerGraeme Geldenhuys <graemeg@gmail.com>2009-10-12 20:36:35 +0200
commitfc49bc5795813536ec54d0380b200244a53bfe4b (patch)
treeeb429ed646506083e541be746fabb3af75d2bd2b /src
parent20adfc4520b18503c3a234f1d51db4d2469d7bfb (diff)
downloadfpGUI-fc49bc5795813536ec54d0380b200244a53bfe4b.tar.xz
Scrollbars: reverse d1e205cfb commit.
ScrollBars are a special case and require BeginDraw & EndDraw inside the HandlePaint event because the component also does drawing from outside the HandlePaint event. eg: When draging the scrollbar button around.
Diffstat (limited to 'src')
-rw-r--r--src/gui/fpg_scrollbar.pas2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gui/fpg_scrollbar.pas b/src/gui/fpg_scrollbar.pas
index 2a2b4bc9..5d69ced6 100644
--- a/src/gui/fpg_scrollbar.pas
+++ b/src/gui/fpg_scrollbar.pas
@@ -126,6 +126,7 @@ end;
procedure TfpgScrollBar.HandlePaint;
begin
+ Canvas.BeginDraw; // Do not remove - Scrollbars do painting outside HandlePaint as well!
if Orientation = orVertical then
begin
DrawButton(0, 0, Width, Width, 'sys.sb.up', FScrollbarDownPart = sbpUpBack);
@@ -138,6 +139,7 @@ begin
end;
DrawSlider(True);
+ Canvas.EndDraw; // Do not remove - Scrollbars do painting outside HandlePaint as well!
end;
procedure TfpgScrollBar.RepaintSlider;