在ddlb/ddplb的Selectionchanged之外获得index

tanye 2001-05-28 10:13:00
我需要一种简单的/一步就能获得DropDownListBox / DropDownPictureListBox
中当前所在项的index值,不需要在Selectionedchanged事件中进行跟踪!
...全文
104 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
billxia 2001-05-29
  • 打赏
  • 举报
回复
1. DataWindowChild dwc
dwc=GetChild (ddlb_test)
2. index=dwc.find('条件',1,999)
liulee 2001-05-28
  • 打赏
  • 举报
回复

建立instance变量 ii_ddlb_index
在ddlb的selectionchanged事件中记录就完了
ii_ddlb_index = index
别的地方随便用,不用再取一次。
xiyahui 2001-05-28
  • 打赏
  • 举报
回复
我也想知道呵呵,pb不像vb,ddlb没有index属性。我以前一直是用Selectionedchanged来获得的。
xiyahui 2001-05-28
  • 打赏
  • 举报
回复
好像finditem是用来匹配相似的项,比如第一个是12第二个是1,如果查1的话第一个也可以查到。
freshman113 2001-05-28
  • 打赏
  • 举报
回复

可以的,如下:

li_index = ddlb_test.finditem(ddlb_test.text,1)

这个问题结了。

1,079

社区成员

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

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