社区
数据库相关
帖子详情
怎摸样让stringgrid的某行某列获得焦点,十万火急,在线等待!
smallpigs
2003-09-11 10:41:53
假如我现在的焦点在stringgrid1的第2列 第3行上,现在我编辑这个数据,而且我在SelectCell中写了判断数据合法性的函数,当我编辑完这个数据后焦点转移时候,如果数据不正确,我想让焦点再次回到我编辑的这个数据上,怎摸处理。
...全文
94
4
打赏
收藏
怎摸样让stringgrid的某行某列获得焦点,十万火急,在线等待!
假如我现在的焦点在stringgrid1的第2列 第3行上,现在我编辑这个数据,而且我在SelectCell中写了判断数据合法性的函数,当我编辑完这个数据后焦点转移时候,如果数据不正确,我想让焦点再次回到我编辑的这个数据上,怎摸处理。
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
4 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
smallpigs
2003-09-11
打赏
举报
回复
谢谢邦助,但是我要在SelectCell事件中做这个处理,但是焦点没有办法回到上一格编辑的单元中,郁闷。。。:( 而且StringGrid1.Row := 2; StringGrid1.Col := 4;本身触发selectcell事件, 中秋节也过不好,烦
linzi
2003-09-11
打赏
举报
回复
StringGrid1.Row := 2;
StringGrid1.Col := 4;
Shiyl
2003-09-11
打赏
举报
回复
var
Column, Row: Longint;
procedure TForm1.StringGrid1MouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
StringGrid1.MouseToCell(X, Y, Column, Row);
showmessage(inttostr( column));
showmessage(inttostr(row));
end;
---------------------------------------
以上部分得到编辑的单元格的行列值。
procedure TForm1.Button1Click(Sender: TObject);
var flag:boolean;
begin
flag:=false;
if flag=False then
begin
showmessage('wrong');
stringgrid1.Cells[column,row]:='';
stringgrid1.SetFocus;
end;
end;
没有调试,试试看
wweijie
2003-09-11
打赏
举报
回复
var
myRect: TGridRect;
begin
myRect.Left := 3;
myRect.Top := 1;
myRect.Right := 3;
myRect.Bottom := 1;
StringGrid1.Selection := myRect;
end;
String
Grid
部分行按列排序
点击
String
Grid
标题列,对该列任意行之间的数据进行排序
delphi
string
Grid
小示列
描述delphi中
String
Grid
的简单用法 本程序一成功运行 不会出现bug
Delphi将
String
grid
指定行添加到Memo控件中.rar
Delphi将
String
grid
指定行添加到Memo控件中,选中
String
Grid
中的行,点击右下角的“添加”按钮,即可将选中的
String
Grid
行数据添加到下边的Memo控件中显示。部分源代码如下: procedure TForm1.FormCreate(Sender:...
string
grid
多选拖拽换行
使用
string
grid
实现行多选, 然后通过拖拽移动选择行位置 按住ctrl可以多选不连续的行
C++ builder6 删除选中的
String
Grid
行
软件使用C++ builder6。删除选中的
String
Grid
行。序号不随删除而变化。如果需要变化,则将第一列的字符转化为数字后-1。
数据库相关
2,497
社区成员
88,445
社区内容
发帖
与我相关
我的任务
数据库相关
Delphi 数据库相关
复制链接
扫一扫
分享
社区描述
Delphi 数据库相关
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章