如何根据 数据库中得出的名称,匹配哪个 radiobutton 选中?

此昵称已经1存在 2010-10-26 04:10:44
如何根据 数据库中得出的名称,匹配哪个 radiobutton 选中?
真的不知如何写了。
...全文
72 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
ddzjok 2010-10-26
  • 打赏
  • 举报
回复
语法错误

for i:=0 to cxGBxgxx.ControlCount-1 do
begin
if (cxGBxgxx.Controls[i] is TcxRadioButton) and (TcxRadioButton(cxGBxgxx.Controls[i]).Caption =trim(FieldValues['parent'])) then
TcxRadioButton(cxGBxgxx.Controls[i]).Checked :=True;
end;
  • 打赏
  • 举报
回复
for i:=0 to cxGBxgxx.ControlCount-1 do
begin
if (cxGBxgxx.Controls[i] is TcxRadioButton) and (TcxRadioButton(cxGBxgxx.Controls[i]).Caption :=trim(FieldValues['parent'])) then
TcxRadioButton(cxGBxgxx.Controls[i]).Checked :=True;
end;



但那个caption处就是编不过去。
kye_jufei 2010-10-26
  • 打赏
  • 举报
回复
1.要麼自定義根據得出的名稱指定其radiobuttion;
2.也可以使用dbradiobuttion組件,指定其數據集和字段值。。。

5,392

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 开发及应用
社区管理员
  • VCL组件开发及应用社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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