;
帖子
3919 
精华
积分
11710 
鱼币
0 ¥ 
来自
大连 
在线时间
1858 小时 
注册时间
2007-6-11 
最后登录
2009-10-20 

贴图大师勋章新人进步勋章宣传大使勋章论坛元老勋章

3
发表于 2009-1-5 19:48 | 只看该作者
鐢ㄤ唬鐮佸疄鐜癓istView鎺т欢鐨勮闂撮殧棰滆壊锛 - 缂栫▼搴 - Powered by SupeSite

浣犵殑浣嶇疆锛缂栫▼搴 >> 璧勮 >> VB >> 绐椾綋寮鍙 >> 璇︾粏鍐呭 鍦ㄧ嚎鎶曠ǹ

鐢ㄤ唬鐮佸疄鐜癓istView鎺т欢鐨勮闂撮殧棰滆壊锛

鍙戝竷: 2008-7-15 14:44 |  浣滆: 缃戠粶杞浇 |   鏉ユ簮: 缃戠粶杞浇 |  鏌ョ湅: 21娆

銆棣栧厛鍦ㄧ獥鍙d腑娣诲姞涓涓狶istView鎺т欢锛屾柟娉曪細鑿滃崟锛>宸ョ▼锛>閮ㄤ欢锛>Microsoft Window Common Control 6.0 锛堝悗闈负鐗堟湰鍙凤級銆傚啀娣诲姞涓涓狿icture鎺т欢锛屾敼鍚嶄负picGreenbar銆

銆銆瀹炵幇鐨勪唬鐮佸涓嬶細

Option Explicit

Private Sub Form_Load()

Dim i As Integer

Dim iFontHeight As Long

Dim iBarHeight As Integer

Dim j As Integer

Dim itmX As ListItem

Dim ColHead As ColumnHeader

ListView1.ColumnHeaders.Add , , "This is Just a Simple Example"

ListView1.ColumnHeaders(1).Width = 3000

'娣诲姞涓浜涘疄楠屾暟鎹

For j = 1 To 33

Set itmX = ListView1.ListItems.Add()

itmX.Text = "This is item number " & CStr(j)

Next j

Me.ScaleMode = vbTwips

picGreenbar.ScaleMode = vbTwips

picGreenbar.BorderStyle = vbBSNone

picGreenbar.AutoRedraw = True

picGreenbar.Visible = False

picGreenbar.Font = ListView1.Font

iFontHeight = picGreenbar.TextHeight("b") + Screen.TwipsPerPixelY

iBarHeight = (iFontHeight * 1)

picGreenbar.Width = ListView1.Width

'======

picGreenbar.Height = iBarHeight * 2

picGreenbar.ScaleMode = vbUser

picGreenbar.ScaleHeight = 2

picGreenbar.ScaleWidth = 1

'draw the actual bars

picGreenbar.Line (0, 0)-(1, 1), vbWhite, BF

picGreenbar.Line (0, 1)-(1, 2), RGB(227, 241, 226), BF

'======

ListView1.PictureAlignment = lvwTile

ListView1.Picture = picGreenbar.Image

End Sub

銆銆浠g爜閲忎笉澶氾紝涓嶈繃寰堝疄鐢ㄣ

TAG: ListView 鎺т欢 闂撮殧 棰滆壊 浠g爜
鎵撳嵃 | 鏀惰棌姝ら〉 |  鎺ㄨ崘缁欏ソ鍙 | 涓炬姤
涓婁竴绡 涓嬩竴绡
 

璇勫垎锛0

鍙戣〃璇勮
鏌ョ湅鍏ㄩ儴鍥炲銆愬凡鏈0浣嶇綉鍙嬪彂琛ㄤ簡鐪嬫硶銆