summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorgraemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2008-03-25 13:25:19 +0000
committergraemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2008-03-25 13:25:19 +0000
commitd6c76fb72a83a593a74a62b8d40b2b51546ec13c (patch)
treed97da35990675400bbbad5a085506bf953f69e3d /src
parent8571d8ad6ecbd5251e90160ad711b90fda812532 (diff)
downloadfpGUI-d6c76fb72a83a593a74a62b8d40b2b51546ec13c.tar.xz
* Added some new skeleton documentation for newly added units.
* Updated the gui_hyperlink documentation. * Updated documentation scripts. * Fixed the painting bug in gui_basegrid where the top-right and bottom-left text or images paint over the control frame.
Diffstat (limited to 'src')
-rw-r--r--src/gui/gui_basegrid.pas21
1 files changed, 16 insertions, 5 deletions
diff --git a/src/gui/gui_basegrid.pas b/src/gui/gui_basegrid.pas
index c4457814..558c0c70 100644
--- a/src/gui/gui_basegrid.pas
+++ b/src/gui/gui_basegrid.pas
@@ -95,6 +95,7 @@ type
procedure SetShowHeader(const AValue: boolean);
function VisibleLines: integer;
function VisibleWidth: integer;
+ function VisibleHeight: integer;
procedure SetFirstRow(const AValue: integer);
protected
procedure UpdateScrollBars; virtual;
@@ -333,7 +334,7 @@ begin
Canvas.DrawButtonFace(ARect, [btnIsEmbedded]);
r := ARect;
InflateRect(r, -2, -2);
- Canvas.SetClipRect(r); // text cannot oversheet header border
+ Canvas.AddClipRect(r); // text may not overshoot header border
(*
// drawing grid lines
Canvas.SetColor(clGridLines);
@@ -448,7 +449,18 @@ begin
sw := FVScrollBar.Width-1
else
sw := 0;
- Result := Width - FMargin*2 - sw;
+ Result := Width - (FMargin*2) - sw;
+end;
+
+function TfpgBaseGrid.VisibleHeight: integer;
+var
+ sw: integer;
+begin
+ if FHScrollBar.Visible then
+ sw := FHScrollBar.Height-1
+ else
+ sw := 0;
+ Result := Height - (FMargin*2) - sw;
end;
procedure TfpgBaseGrid.SetFirstRow(const AValue: integer);
@@ -554,8 +566,8 @@ begin
Canvas.SetClipRect(r);
Canvas.SetColor(FBackgroundColor);
Canvas.FillRectangle(r);
-
- clipr.SetRect(FMargin, FMargin, VisibleWidth, Height-(2*FMargin));
+
+ clipr.SetRect(FMargin, FMargin, VisibleWidth, VisibleHeight);
r := clipr;
if (ColumnCount > 0) and ShowHeader then
@@ -662,7 +674,6 @@ begin
FHScrollBar.Height);
end;
-
Canvas.EndDraw;
end;