From 9462d3a6b12c2f5d35ebc5035d2c2205edd8a8db Mon Sep 17 00:00:00 2001 From: graemeg Date: Wed, 28 May 2008 14:56:30 +0000 Subject: * Column widths are now setup correctly in the stringgrid mediator. --- extras/tiopf/gui/tiCompositeMediators.pas | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'extras/tiopf/gui') 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); -- cgit v1.2.3-70-g09d2