首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > PB >

请问下ListView的用法GetItem(index,2,Pos)

2012-02-24 
请教下ListView的用法GetItem(index,2,Pos)现有一ListViewlist_test一数组 AA[]我想把数组AA[i]传递给list

请教下ListView的用法GetItem(index,2,Pos)
现有一ListView list_test 一数组 AA[]

我想把数组 AA[i] 传递给 list_test的某item 要求这个item要记做数组的编号 i 

源码如下:
string pos
list_test.GetItem(index,2,Pos) 
if NOT IsNumber(pos) then
return -1
else
  AA[Pos] = ........... 
end if

显然这个pos值就是数组AA[i]中对应的i 那么最开始AA[i]传值时是怎样把i传给list_test的某item的 ??

还有listview函数 GetItem ( index, column, label ) 其中的column列代表listview的属性,我怎么确定他有哪些属性和属性对应的序号  

问题有点多,但是只有20分了,不好意思,请教各位果断出手 感激不尽
大家新年快乐,恭喜发财啊

[解决办法]
像你上面的写法,list_test.GetItem(index,2,Pos) 中的 pos 怎么会和你要的数组AA 中的下标扯上关系呢? 至少那个 pos 你声明的是 string 型,而数组下标需要整数类型的吧?

这是PB 的帮助里抄的:

C/C++ code
This example gets the displayed values from column 1 and column 3 of the first row of the lv_list ListView and displays them in the sle_info SingleLineEdit control.string ls_artist, ls_complv_list.GetItem(1, 1 , ls_comp)lv_list.GetItem(1, 3 , ls_artist)sle_info.text = ls_artist +" wrote " + ls_comp + "."大致意思是:这个例子取的是lv_list 里第1行 第3 和第1 列的值放在 sle_info 里显示 。 

热点排行