怎样在StringGrid中加入一个随单元格移动的edit? 想在向StringGrid输入数据的时候,用一个随单元格移动的edit来进行输入,怎样让edit跟着单元格焦点的变化而移动? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 ComboBox1.Visible := False;ComboBox1.Left := StringGrid1.Left + StringGrid1.CellRect(ACol, ARow).Left + 2;ComboBox1.Top := StringGrid1.Top + StringGrid1.CellRect(ACol, ARow).Top + 1;ComboBox1.Height := StringGrid1.RowHeights[ARow] + 3;ComboBox1.Width := StringGrid1.ColWidths[ACol] + 4;ComboBox1.Visible := True; 怎样让edit移动到单元格时显示单元格的内容,改动edit内容是把改动的内容写入相应的单元格呢? 要实现你说的功能,不必要用edit吧,在StringGrid的单击事件中加入:procedure TForm1.StringGrid1Click(Sender: TObject);beginstringgrid1.EditorMode:=true;end; up我需要用edit来限制输入 up我需要用edit来限制输入 up我需要用edit来限制输入 procedure TForm1.StringGrid1Click(Sender: TObject);var ACol,ARow:integer;begin ComboBox1.Visible := False; ACol:=StringGrid1.Col; ARow:=StringGrid1.Row; ComboBox1.Left := StringGrid1.Left + StringGrid1.CellRect(ACol, ARow).Left + 2; ComboBox1.Top := StringGrid1.Top + StringGrid1.CellRect(ACol, ARow).Top + 1; ComboBox1.Height := StringGrid1.RowHeights[ARow] + 3; ComboBox1.Width := StringGrid1.ColWidths[ACol] + 4; ComboBox1.Visible := True;end; 怎样让edit移动到单元格时显示单元格的内容,改动edit内容是把改动的内容写入相应的单元格呢? 怎样让edit移动到单元格时显示单元格的内容,改动edit内容是把改动的内容写入相应的单元格呢? up 怎样让edit移动到单元格时显示单元格的内容,改动edit内容是把改动的内容写入相应的单元格呢? 没有按照预想的:每执行一步显示该步的执行结果。这是为什么? cxGrid第一列加入CheckBox的问题 大家帮帮忙啊 delphi简单进销存程序 有关制作安装程序! 如何格式化硬盘分区?*_* 在FastReport中如何用程序来调整上下,左右边距?(在线等,急急!) 为什么我的软件在professional上运行不了? 请教关于DELPHI5和DELPHI6中datetimepicker控件的问题 中秋大酬宾 积分大放送! 考研还是....? Please help me???? Query与SQL的参数传递 如何知道MP3文件是VBR还是CBR?
ComboBox1.Left := StringGrid1.Left + StringGrid1.CellRect(ACol, ARow).Left + 2;
ComboBox1.Top := StringGrid1.Top + StringGrid1.CellRect(ACol, ARow).Top + 1;
ComboBox1.Height := StringGrid1.RowHeights[ARow] + 3;
ComboBox1.Width := StringGrid1.ColWidths[ACol] + 4;
ComboBox1.Visible := True;
begin
stringgrid1.EditorMode:=true;
end;
我需要用edit来限制输入
我需要用edit来限制输入
我需要用edit来限制输入
var
ACol,ARow:integer;
begin
ComboBox1.Visible := False;
ACol:=StringGrid1.Col;
ARow:=StringGrid1.Row;
ComboBox1.Left := StringGrid1.Left + StringGrid1.CellRect(ACol, ARow).Left + 2;
ComboBox1.Top := StringGrid1.Top + StringGrid1.CellRect(ACol, ARow).Top + 1;
ComboBox1.Height := StringGrid1.RowHeights[ARow] + 3;
ComboBox1.Width := StringGrid1.ColWidths[ACol] + 4;
ComboBox1.Visible := True;end;
怎样让edit移动到单元格时显示单元格的内容,改动edit内容是把改动的内容写入相应的单元格呢?