社区
Delphi
帖子详情
RadioGroup如何被选中的问题
chenzhechenge
2004-08-18 01:12:24
假设在RadioGroup中所有的RadioButton的初始状态Checked设定为false,不用键盘、不点鼠标,只让鼠标放在RadioButton的上面,那么那个RadioButton就自动被选中,用程序如何实现?
...全文
448
10
打赏
收藏
RadioGroup如何被选中的问题
假设在RadioGroup中所有的RadioButton的初始状态Checked设定为false,不用键盘、不点鼠标,只让鼠标放在RadioButton的上面,那么那个RadioButton就自动被选中,用程序如何实现?
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
10 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
muziling
2004-08-18
打赏
举报
回复
可以,我试了
cdsgajxlp
2004-08-18
打赏
举报
回复
radiogruop中的好象不行
帮顶
muziling
2004-08-18
打赏
举报
回复
晕,我第一个答的,答案和我一样就没必要贴了,楼主,分是给我一人的.
我辛辛苦苦在那些事件里试的~~~~
qizhanfeng
2004-08-18
打赏
举报
回复
onmousemove
不行吗
梅青松
2004-08-18
打赏
举报
回复
radiogruop中的也可以
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls;
type
TForm1 = class(TForm)
RadioGroup1: TRadioGroup;
RadioButton1: TRadioButton;
RadioButton2: TRadioButton;
RadioButton3: TRadioButton;
procedure RadioButton1MouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
procedure RadioButton2MouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
procedure RadioButton3MouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.RadioButton1MouseMove(Sender: TObject; Shift: TShiftState;
X, Y: Integer);
begin
RadioButton1.Checked := true;
end;
procedure TForm1.RadioButton2MouseMove(Sender: TObject; Shift: TShiftState;
X, Y: Integer);
begin
RadioButton2.Checked := true;
end;
procedure TForm1.RadioButton3MouseMove(Sender: TObject; Shift: TShiftState;
X, Y: Integer);
begin
RadioButton3.Checked := true;
end;
end.
panjinfu80
2004-08-18
打赏
举报
回复
up
飞天揽月
2004-08-18
打赏
举报
回复
窗口上的可以
procedure TForm1.RadioButton2MouseMove(Sender: TObject; Shift: TShiftState;
X, Y: Integer);
begin
radiobutton2.Checked:=true;
end;
radiogruop中的不可以
飞天揽月
2004-08-18
打赏
举报
回复
onmousemove
rcaicc
2004-08-18
打赏
举报
回复
mouseenter这个我不知道怎么用,在其他帖子见到的。不知道这里能不能用上
muziling
2004-08-18
打赏
举报
回复
写到onmousemove就可以了
RadioGroup
选中
状态的
问题
本文介绍如何在XML文件中设置RadioButton的初始
选中
状态,并解决当
RadioGroup
包含多个RadioButton时,
选中
状态无法更改的
问题
。通过在代码中使用
radioGroup
.check方法,可以有效解决这一
问题
。
Android开发—
RadioGroup
中RadioButton默认
选中
问题
本文介绍了解决在Android中默认
选中
RadioButton的
问题
,并提供了一种有效的方法:为每个RadioButton设置ID,然后使用
RadioGroup
的check方法指定要
选中
的RadioButton。
关于
RadioGroup
某个item设置为check后,会一直
选中
的
问题
本文记录了一个关于
RadioGroup
设置默认
选中
项时遇到的
问题
。当每个RadioButton未设置ID时,切换选择时总是保持默认选项被
选中
。解决方法是为每个RadioButton添加ID。
Android
RadioGroup
中设置默认
选中
RadioButton 后,
选中
两个的
问题
解决方法
本文详细介绍了在Android应用开发中,如何解决
RadioGroup
中多个RadioButton,默认
选中
两个的
问题
。通过调整代码逻辑,使用
RadioGroup
的check方法替代RadioButton的setCheck方法,实现了正确的默认
选中
行为。
关于
RadioGroup
中的radiobutton
选中
状态保存的
问题
!!
本文探讨了在Android应用中使用
RadioGroup
控件时遇到的
问题
:在不同Activity间跳转后,
RadioGroup
的选择状态丢失。文中详细介绍了如何通过SharedPreferences保存和恢复
RadioGroup
的
选中
状态,并解决了因RadioButton ID动态变化导致的
问题
。
Delphi
5,943
社区成员
262,942
社区内容
发帖
与我相关
我的任务
Delphi
Delphi 开发及应用
复制链接
扫一扫
分享
社区描述
Delphi 开发及应用
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章