新手刚学PowerBuilder,如何遍历窗体中GroupBox控件中的其他控件

a297101550 2011-09-16 03:58:13
GroupBox中放了几个单选按钮,如何动态遍历出GroupBox中的单选按钮并获取其是否被选中的状态。
...全文
142 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
yyoinge 2011-09-16
  • 打赏
  • 举报
回复
this 指的是当前window, 如果以上代码是写在窗口的控件中的,需要将this改成parent
yyoinge 2011-09-16
  • 打赏
  • 举报
回复
long i
RadioButton lrb
for i = 1 to upperbound(this.control)
if this.control[i].typeof() = RadioButton! then //单选框
lrb = this.control[i]
if lrb.x >= gb_1.x and lrb.y >= gb_1.y and lrb.x <= gb_1.x + gb_1.width and lrb.y <= gb_1.y + gb_1.height then //在gb_1内
//lrb.checked 判断是否选择,然后做你想做的
end if
end if
next

1,109

社区成员

发帖
与我相关
我的任务
社区描述
PowerBuilder 相关问题讨论
社区管理员
  • 基础类社区
  • WorldMobile
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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