TAChart: Increase width of Text column in DataPoints editor.

git-svn-id: trunk@60512 -
This commit is contained in:
wp 2019-02-26 15:27:34 +00:00
parent ff44f7fc58
commit 6e6af28591
2 changed files with 11 additions and 8 deletions

View File

@ -68,6 +68,7 @@ object DataPointsEditorForm: TDataPointsEditorForm
CancelButton.Name = 'CancelButton'
CancelButton.DefaultCaption = True
TabOrder = 1
DefaultButton = pbHelp
ShowButtons = [pbOK, pbCancel]
end
object pmRows: TPopupMenu

View File

@ -155,16 +155,18 @@ begin
// Adjust column widths
w := sgData.Canvas.TextWidth('$000000') + 3*varCellPadding + sgData.DefaultRowHeight;
for i := 0 to sgData.Columns.Count-1 do
for i := 0 to sgData.Columns.Count-2 do
sgData.Columns[i].Width := w;
sgData.Columns[sgData.Columns.Count-1].Width := 3*w;
{$IFDEF WINDOWS}
Width := sgData.ColWidths[0] + 1 + sgData.Columns.Count * w + sgData.Left * 2 +
IfThen(sgData.BorderStyle = bsNone, 0, 3);
{$ELSE}
Width := sgData.ColWidths[0] + sgData.Columns.Count * w + sgData.Left * 2 +
sgData.GridLineWidth * (sgData.Columns.Count-1);
{$ENDIF}
w := sgData.ColWidths[0] + sgData.Left * 2;
for i := 0 to sgData.Columns.Count-1 do
inc(w, sgData.Columns[i].Width);
{$IFDEF WINDOWS}
Width := Min(Screen.Width, w + 1 + IfThen(sgData.BorderStyle = bsNone, 0, 3));
{$ELSE}
Width := Min(Screen.Width, w + sgData.GridLinedWidth * (sgData.Columns.Count-1));
{$ENDIF}
end;
procedure TDataPointsEditorForm.miDeleteRowClick(Sender: TObject);