property Cells[ACol, ARow: Integer]: string;帮助文件里说cells[i,j]为string,如何将其改为Tlistbox?即每个cell显示一个listbox,每个listbox有其独立的属性、方法、事件。谢谢,将高分回馈您~
解决方案 »
- 做一个按钮在5秒内单击第二次的时候,提示“你单击的速度过快了”
- delphi 单击按钮弹出对话框:请输入姓名 这个怎么实现?
- dll窗体消息问题--------------在线等???
- 请问如何操作可以用together生成现有代码的sequence图!!!!!
- 数据库连接字符窜问题求助?(在线求)
- 查找时间问题,在线等!
- delphi 7 中的注释不能用汉字?
- 谁遇到过这么怪的问题?cancelbatch时竟然出错!
- ?打印预览的窗口可以定制吗,怎么定制呢?
- 请教哪里有Rational Rose的下载
- Delphi 怎樣insert CLOB類型的值
- 求助delphi + access,程序到了没装access的机器,用不了。
如果是用stringgrid,也可以自己加上listbox,但是自己写代码控制有点麻烦,要根据监控cell焦点的变化,来判断什么时候该显示listbox。
begin
StringGrid1.Cells[1, 1] := 'abc';
StringGrid1.Cells[1, 2] := 'abcd'; cbb1.Clear;
cbb1.Items.Add('a');
cbb1.Items.Add('b');
cbb1.Items.Add('c');
end;procedure TForm11.StringGrid1SelectCell(Sender: TObject; ACol, ARow: Integer;
var CanSelect: Boolean);
begin
cbb1.Left := StringGrid1.CellRect(ACol, ARow).Left;
cbb1.Top := StringGrid1.CellRect(ACol, ARow).Top;
cbb1.Parent := StringGrid1;
cbb1.Width := stringgrid1.CellRect(ACol, ARow).Right-StringGrid1.CellRect(ACol, ARow).Left;
cbb1.ItemIndex :=0;
cbb1.Visible := TRUE;
end;