一个难题,请进来看看!

中山中盈科技 2002-07-01 12:20:49
各位大侠,请问在Treeview中设定了Checkboxes为True,但怎么样取每一项是否为已选定呢(相对VB的Checked)呢?
...全文
39 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
qiuyang_wang 2002-07-01
  • 打赏
  • 举报
回复
定义一个TreeViewItem 变量 TvItem
循环使用:FindItem()函数找到每一个项,判断Selected属性即可:
if TvItem.Selected then
//选中的处理
else
//非选中的处理
end if
qiuyang_wang 2002-07-01
  • 打赏
  • 举报
回复
当然可以多选,要不怎么叫你循环判断所有呢,如果选中,记录下来不就行了。
jianghuxing 2002-07-01
  • 打赏
  • 举报
回复
可以用expandedonce属性得到某项目的子项目是否已展开(已选定),如果为ture 则表示展开过,
中山中盈科技 2002-07-01
  • 打赏
  • 举报
回复
厉害!谢谢啦!
misslyy 2002-07-01
  • 打赏
  • 举报
回复
你在程序里取出picture index看一下
是1代表unchecked
2代表checked
misslyy 2002-07-01
  • 打赏
  • 举报
回复
The state of an item's checkbox can be determined by checking the state picture index for the item:
Unchecked = 1
Checked = 2
中山中盈科技 2002-07-01
  • 打赏
  • 举报
回复
Selected好像单选的吧,有没有像Checked属性!

1,109

社区成员

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

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