Sg1 定义为 StrignGrid
只有一行,放在panel1上
程序中有以下语句
Sg1.Width:=panel1.Width-4;
for i:=0 to Sg1.ColCount -1 do
begin
Sg1.ColWidths[i]:=SG1.Width div Sg1.ColCount;
end;为什么鼠标点击最后一列时
Sg1的整行向左移,留出正好一个Sg1.ColWdith宽度
怎么不让他左移查了一下午的help 以及网上的faq
反复将option的选项改为false true 都不行
只有一行,放在panel1上
程序中有以下语句
Sg1.Width:=panel1.Width-4;
for i:=0 to Sg1.ColCount -1 do
begin
Sg1.ColWidths[i]:=SG1.Width div Sg1.ColCount;
end;为什么鼠标点击最后一列时
Sg1的整行向左移,留出正好一个Sg1.ColWdith宽度
怎么不让他左移查了一下午的help 以及网上的faq
反复将option的选项改为false true 都不行
{$R *.dfm}
uses UnitDataModule;
procedure TFormView.FormShow(Sender: TObject);
var i:integer;
begin
Sg1.ColCount:=1;
with UnitDataModule.DataModule1 do
begin
for i:=0 to Title.ItemCount do
begin
if Title.item[i].kind = 0 then
begin
Sg1.Cells[Sg1.ColCount-1,0]:=Title.Item[i].txt;
Sg1.ColCount:=Sg1.ColCount+1;
end;
end;
Sg1.ColCount:=Sg1.ColCount-1;
end;
Sg1.Width:=panel1.Width-4;
for i:=0 to Sg1.ColCount -1 do
begin
Sg1.ColWidths[i]:=SG1.Width div Sg1.ColCount;
end;
end;
end.
没有滚动条
这个问题???