|
-
Jul 5th, 1999, 09:59 PM
#1
Thread Starter
Member
Hello everyone,
I got the following code from vb help, How can I hilight and make the colomn itmX.SubItems(1) = CStr(myRs!Au_id) in different color like blue? Thanks for your help in advance.
While Not myRs.EOF
Set itmX = ListView1.ListItems. _
Add(, , CStr(myRs!Author)) ' Author.
' If the AuthorID field is not null, then set ' SubItem 1 to it.
If Not IsNull(myRs!Au_id) Then itmX.SubItems(1) = CStr(myRs!Au_id)
End If ' If the birth field is not Null, set ' SubItem 2 to it.
If Not IsNull(myRs![Year Born]) Then
itmX.SubItems(2) = myRs![Year Born] End If
myRs.MoveNext ' Move to next record. Wend
-
Jul 7th, 1999, 03:00 PM
#2
Lively Member
I don't believe there is any way to color a column/subitem in a list view.... however, for an excellent discussion of adding features to list views, check out this web site http://www.mvps.org/vbnet/
They talk about adding features to list views like sorting by clicking on columnheaders, dragging columns to new locations, etc.
Hope this helps
Bash
-
Jul 7th, 1999, 09:45 PM
#3
Thread Starter
Member
thanks bashfirst for your respond. I got the answer after experimenting alot in listview. here is my answer:
Dim itmX As ListItem
itmX.ListSubItems(1).ForeColor = &HFF&
------------------
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
|