(在线等)关于StringGrid1中EditorMode属性问题!

iloverainbow 2003-10-19 09:43:24
EditorMode属性是控制整个StringGrid的属性吧,也就是说当EditorMode=false时,整个StringGrid都不能进行编辑,我现在只使其中的某几列不能编辑,其它可能编辑,不知能不能实现??
谢谢指点?
...全文
59 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
qaqa2003 2003-11-09
  • 打赏
  • 举报
回复
OnDrawCell事件中加入:
void __fastcall TForm1::StringGrid1SelectCell(TObject *Sender, int ACol,
int ARow, bool &CanSelect)
{
if(ACol==2||ACol==5||ACol==8)
StringGrid1->Options<<goEditing;///////可以编辑的列
else
StringGrid1->Options>>goEditing;///////不能编辑的列
}
qaqa2003 2003-10-19
  • 打赏
  • 举报
回复
好象可以用goediting属性的!





iloverainbow 2003-10-19
  • 打赏
  • 举报
回复
难道很少有人这样用吗?

13,822

社区成员

发帖
与我相关
我的任务
社区描述
C++ Builder相关内容讨论区
社区管理员
  • 基础类社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧