delphi中STRINGGRID的用法

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了delphi中STRINGGRID的用法相关的知识,希望对你有一定的参考价值。

for I := 1 to Screen.Fonts.Count do
begin
StringGrid1.Cells [I, 0] := Screen.Fonts.Strings [I-1];
StringGrid1.Canvas.Font.Name := StringGrid1.Cells [I, 0];
StringGrid1.Canvas.Font.Size := 32;
StringGrid1.ColWidths [I] :=
StringGrid1.Canvas.TextWidth (’AaBbYyZz’);
end;
能给解释下各句的意思吗??小弟万分感激``

参考技术A StringGrid行列的增加和删除
type
TExCell = class(TStringGrid)
public
procedure DeleteRow(ARow: Longint);
procedure DeleteColumn(ACol: Longint);
procedure InsertRow(ARow: LongInt);
procedure InsertColumn(ACol: LongInt);
end;
procedure TExCell.InsertColumn(ACol: Integer);
begin
ColCount :=ColCount +1;
MoveColumn(ColCount-1, ACol);
end;
procedure TExCell.InsertRow(ARow: Integer);
begin
RowCount :=RowCount +1;
MoveRow(RowCount-1, ARow);
end;
procedure TExCell.DeleteColumn(ACol: Longint);
begin
MoveColumn(ACol, ColCount -1);
ColCount := ColCount - 1;
end;
procedure TExCell.DeleteRow(ARow: Longint);
begin
MoveRow(ARow, RowCount - 1);
RowCount := RowCount - 1;
end.
参考技术B 1,列举出系统所有的字体并显示在第一列
2,设置Canvas的字体名称跟该cell的内容相同
3,设置Canvas的字体大小
4,设置cell的宽度
5,设置Canvas的字宽
参考技术C 遍历可获取的字体,在表格的第一列,用该字体的样式,32号字体,显示字体的名称,并设置列的宽度

以上是关于delphi中STRINGGRID的用法的主要内容,如果未能解决你的问题,请参考以下文章

delphi关于stringgrid字符串转换的问题

急需解决delphi 重stringgrid的定位方法 !!!!!!!!

Delphi StringGrid常用属性和常用操作

Delphi StringGrid常用属性和常用操作

Delphi中StringGrid控件如何添加数据?

delphi stringGrid