listview使用(摘自pb 帮助文件)

This example assigns display values to three columns in a report view for three lv_list ListView items:

listviewitem l_lvi
integer li_count, li_index
FOR li_index = 1 to 3
        li_count=li_count+1
        lv_1ist.AddItem("Category " + String(li_index), 1)
NEXT

lv_list.AddColumn("Composition", Left! , 860)
lv_list.AddColumn(" Album", Left! , 610)
lv_list.AddColumn(" Artist", Left! , 710)

lv_list.SetItem(1 , 1 , "St. Thomas")
lv_list.SetItem(1 , 2 , "The Bridge")
lv_list.SetItem(1 , 3 , "Sonny Rollins")

lv_list.SetItem(2 , 1 , "So What")
lv_list.SetItem(2 , 2 , "Kind of Blue")
lv_list.SetItem(2 , 3 , "Miles Davis")

lv_list.SetItem(3 , 1 , "Goodbye, Porkpie Hat")
lv_list.SetItem(3 , 2 , "Mingus-Ah-Um")
lv_list.SetItem(3 , 3 , "Charles Mingus")


Applies to

ListView controls

Description

A ListView has four ways to display its items:

?Large icon view     Items are arranged from left to right and the user can move items around when drag and drop is enabled. Each item's picture is taken from the large picture list and the item label is below the picture.
?Small icon view    Same as large icon view except each item's picture is taken from the small picture list and the item label is to the right of the picture.
?List view    Items are arranged from top to bottom. Each item's picture is taken from the small picture array.

?Report view     Items are arranged from top to bottom with one or more columns of information for each item. You must write a script to set up the columns.

Usage

In a painter  

?To select the view type:

?Select the desired view type from the View drop-down list on the General page of the control's Properties view.

In scripts  
The View property takes a value of the ListViewView enumerated datatype.
The following line specifies that small pictures appear for the items in the ListBox.

lv_1.View = ListViewSmallIcon!
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值