Home > Software engineering >  VBS use the ListView Control 6.0, show only the column head, don't display content is how to re
VBS use the ListView Control 6.0, show only the column head, don't display content is how to re

Time:02-24

As title, the code is as follows:
ListView1. View=3
ListView1. GridLines=True
With ListView1
. The ColumnHeaders. Clear
. The ListItems. Clear
. ColumnHeaders. Add, "name"
ColumnHeaders (1). The Width=1200
. ColumnHeaders. Add, "age"
ColumnHeaders (2). The Width=1000
. ColumnHeaders. Add, "position"
ColumnHeaders (3). The Width=2000
. ColumnHeaders. Add, "phone"
ColumnHeaders (4). Alignment=lvwColumnLeft
ColumnHeaders (4). The Width=2000

. ListItems. Add, "zhang SAN"
ListItems (1). SubItems (1)="20"
ListItems (1). SubItems (2)="secretary"
ListItems (1). SubItems (3)="1365555555"

End With

CodePudding user response:

 ListView1. Height=1200 
.

Give it a try?

CodePudding user response:

Hello, miss zhao,
Try, just to set the height of the list control is 1200 pixels, content or not to display,
  • Related