summaryrefslogtreecommitdiff
path: root/extras/tiopf/gui
diff options
context:
space:
mode:
authorgraemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2008-05-28 14:56:30 +0000
committergraemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2008-05-28 14:56:30 +0000
commit9462d3a6b12c2f5d35ebc5035d2c2205edd8a8db (patch)
tree758796953ec1a4e21e4b098033a97b9deda1ba2a /extras/tiopf/gui
parent2fab8094c8bfb2be21588b6666fbc08ed6daebf9 (diff)
downloadfpGUI-9462d3a6b12c2f5d35ebc5035d2c2205edd8a8db.tar.xz
* Column widths are now setup correctly in the stringgrid mediator.
Diffstat (limited to 'extras/tiopf/gui')
-rw-r--r--extras/tiopf/gui/tiCompositeMediators.pas6
1 files changed, 2 insertions, 4 deletions
diff --git a/extras/tiopf/gui/tiCompositeMediators.pas b/extras/tiopf/gui/tiCompositeMediators.pas
index 14e8bb79..4ecd1b92 100644
--- a/extras/tiopf/gui/tiCompositeMediators.pas
+++ b/extras/tiopf/gui/tiCompositeMediators.pas
@@ -687,8 +687,8 @@ begin
FView.ColumnTitle[i] := tiFieldCaption(lField);
//resize the last column to fill the grid.
- if i = tiNumToken(FDisplayNames, cFieldDelimiter) then
- FView.ColumnWidth[i] := FView.Width - lColumnTotalWidth + 10
+ if i = tiNumToken(FDisplayNames, cFieldDelimiter)-1 then
+ FView.ColumnWidth[i] := FView.Width - (lColumnTotalWidth + 10)
else
lColumnTotalWidth := lColumnTotalWidth + FView.ColumnWidth[i] + 20;
end;
@@ -759,9 +759,7 @@ begin
SetupGUIandObject;
if (FDisplayNames <> '') and (tiNumToken(ADisplayNames, cFieldDelimiter) > 0) then
- begin
CreateSubMediators;
- end;
if IsObserving then
FModel.AttachObserver(Self);