|
-
May 10th, 2002, 03:21 AM
#1
problem with listview control
I am trying to add icons to listview control.But its giving Type Mismatch error.pls give the exact solution.
I am using this code
Private Sub Form_Load()
dim lst as listview
set lst=listview1.listitems.add(,,""CD")
end sub
Thanking you
Vikram N.
-
May 10th, 2002, 08:09 AM
#2
Re: problem with listview control
Your example should give comple errors because of mismatched quote marks.
In order to add Icons to the Listview, you must supply at least one Imagelist with the Icons in it.
The format of the Listview.Add is:
DIm NX as ListItem
set NX = Listview1.Add(Index,Key,Text,Icon,smallIcon)
NX.SubItems(1) = "Column 2 data"
'
Index relates to where it is positioned within the list, BLank puts it at the end
'
Key must be unique and Alphabetic
'
Text can be anything
'
Icon is a numeric pointer to a Imagelist Icon
'
Ditto for smallIcon
[/vbcode]
'
'
Please rate it if it answers the question
or is useful.
'
John G
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|