请各位大侠指点,在listBox和grid的使用中,怎么判断他们当中是否有被选中的行?
解决方案 »
- 没有后缀名,但是知道是word或excel文件,怎么确定是word还是excel
- 灰鸽子源码编译出现Too many actual parameters错误
- 我开始用Delphi进行PCI7501板子的控制编程,我有问题要问各位高手!!!!!!!
- 关于DSPack?
- 大家好,我把本地数据库放到网上,为什么奇慢无比?
- 关于access的数据库备份问题?
- 请问团队开发是什么?
- 网页gzip编码怎么获取源代码
- 请问怎么将Excel文件转换为dbase3格式!!急!!
- fastreport的OLE中如何动态加载WORD文件?
- onFilterRecord事件的用法
- 怎样截获桌面右键菜单上的“刷新”操作的消息?
procedure TForm1.Button1Click(Sender: TObject);
begin
if ListBox1.ItemIndex > -1 then
ShowMessage('有选中的!')
end;//Grid是那种Grid??
有一个SelCount,下面有说明
Indicates the number of items that are selected when multiple selections are allowed.Delphi syntax:property SelCount: Integer;C++ syntax:__property int SelCount = {read=GetSelCount, nodefault};Description SelCount is read-only. Use SelCount to find the number of selected items in the list box when the MultiSelect property is true.When the MultiSelect property is false, SelCount is always ?.
ShowMessage('有选中的行!');
ItemIndexTStringGrid:
Row
ShowMessage('有选中的!')
2.if DBGrid1.SelectedRows.Count > -1 then
ShowMessage('有选中的行!');
ShowMessage('selected');