Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




Listview - Report View With Icons?


Is it true that is you have the listview's view set to 3 (lvwReport) that it can't show icons?

I have a imagelist on a form with a picture in it. The picture has a key. I set the listview's icons and small icons to this imagelist. I tryed to add the picture to a listview menu item and used its key.

Didn't work. Any suggestions?




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Icons In Listview In Report View
Hi, I am having trouble trying to display icons in a listview. I am displaying the listview in report mode and I have all the imagelists properly bound. If im not mistaken, the icons used in the report view use the 'small' imagelist, correct? Anyway I am populating the imagelist by creating a ListItem variable and setting it to Listview1.Add each time through the loop. Could this be the problem?

Help About ListView Report View
How can I add a new item to a particular column in report view? For example I have a columns named First and Second, I want to add an item to the Second column and not in First. Please tell me how. Please. Please. Please.

Displaying Icons In Listview - Report Mode
Hi,

I have a ListView on my form which displays data in Report Mode. I wish to be able to display little icons next to the items in my ListView but when I try to add the icon it tells me that the ImageView must first be initialised.

My question... what do I have to do to allow icons to be displayed? Is it possible to display icons in report mode or not? I want to add the icons to each item just after I add it to the list, if this makes it easier.

Here is the simplified piece of code I am using to add items to the ListView

VB Code:
count = 0Dim items as ListItemDo Until (count = 100)  Set items = Form1.ListView1.ListItems.Add(, , itemToAdd(count))  items.SubItems(1) = itemSubToAdd(count)  ' insert code here to add an icon to each item (not each subitem, only each main item)  count = count + 1Loop


Thanks guys.

WATTO
watto@watto.org
http://www.watto.org

Adding Icons To A Listview Report Style
Someone can tell me a little bit how to add icons at each line of a listview int report style ?
Just explain it fast ... I should understand ..

thanks

Listview + Report View + Colour
Can I make subitems have different backcolors or forecolors to them?

Right To Left ListView? (Report View)
I've tried implementing a right-aligned listview (comctl 6.0), but without any effect.
The listview is in report view mode.
Running WinXP. Shell language is Hebrew.

Code:
OldExStyle = GetWindowLong(lvwLearn.hWnd, GWL_EXSTYLE)
OldExStyle = SetWindowLong(lvwLearn.hWnd, GWL_EXSTYLE, OldExStyle _
Or WS_EX_LEFTSCROLLBAR Or WS_EX_RIGHT Or WS_EX_RTLREADING)
There is no apparent change to the listview, even though the call succeeds.

Does anyone have a solution?

ListView (Report View) Troubles...
I have a list view that can contain alot, a few, or no values at all at any given time.
The box will display existing information in row 1, then in row 2 it will display the information that will overwrite the existing information (if the user chooses). Then the 3rd will be existing, 4th new, 5th existing, 6th new, etc...

The grid goes in pairs, and the check boxes are turned on. By default nothing is checked. I want the user to be able to click whatever they choose, if they check the box on an odd row, then all the text in every cell of that row will go bold, and the entire row after that cell will lose its bold font (incase it was selected before). The rows look like this:

1 asdfas as as dasdfasf asdf
1 asdf asf asdf asdf asd fasf asd
2 asf asdf asdf asf asf asdf asdf
2 asf asd fasdf asd fasdf asdf asdf
3 asdf asdf asf asf asdf asdf asdf
3 asdf asdf adsf adsf as fasd
4 adsf asdf sdf asf sa dfas fasdf as
4 asdfasdfa sdf asdf as fafs

Of course with check boxes to the left of the numbers, if i click the 2 on the bottom, it will go bold and the 2 above it will be unchecked and go back to non-bold font. I know this is possible, im pretty close already.. Here's what i have:


Code:
Private Sub lvConflicts_ItemCheck(ByVal Item As MSComctlLib.ListItem)
Dim MyCount As Integer
If Item.Checked = True Then
Item.Bold = True
For MyCount = 1 To 8
Item.ListSubItems.Item(MyCount).Bold = True
Select Case Right(Item.Index, 1)
Case Is = 1, 3, 5, 7, 9
Item.ListSubItems.Item(MyCount).ForeColor = vbBlack
lvConflicts.ListItems(Item.Index + 1).ForeColor = &H808080
lvConflicts.ListItems(Item.Index + 1).Checked = False
Case Is = 0, 2, 4, 6, 8
Item.ListSubItems.Item(MyCount).ForeColor = vbBlack
lvConflicts.ListItems(Item.Index - 1).ForeColor = &H808080
lvConflicts.ListItems(Item.Index - 1).Checked = False
End Select
Next MyCount
Else
Item.Bold = False
For MyCount = 1 To 8
Item.ListSubItems.Item(MyCount).Bold = False
Select Case Right(Item.Index, 1)
Case Is = 1, 3, 5, 7, 9
Item.ListSubItems.Item(MyCount).ForeColor = vbBlack
lvConflicts.ListItems(Item.Index + 1).ForeColor = &H808080
Case Is = 0, 2, 4, 6, 8
Item.ListSubItems.Item(MyCount).ForeColor = vbBlack
lvConflicts.ListItems(Item.Index - 1).ForeColor = &H808080
End Select
Next MyCount
End If
End Sub


Im practically doing it already, i know it.. I think im just thinking too hard.. ive been working too long on this

Listview (report View) Scrollbars
I can't seem to figure this out: how do I add vertical and horizontal scroll bars to a Listview control with its "View" property set to "lvwReport"? I have tried many thing ... but none seem to work.

Moving Columns On A Listview (Report View)
I want to programmatically set the Position of the columns in a list view.

This is an "after thought" so I am trying to do it on already loaded listviews.


I see from a little experimentation that I can easily move the column headers by simply changing the .position property.

But that does not bring over the data for that column. (Just the header)

Do I have to manually move the data or there an easier way?


(By "manually move the data" I mean set up a temp array, copy the column's data, update new column after moving other column into original col number)


Regards,

ListView Report Mode View - RESOLVED
When I change to report mode view nothing is showing up in my listview. When I change it to List view my data shows up. Any ideas?


VB Code:
Private Sub LoadTableSpecs()        Dim oSQLServer As New SQLDMO.SQLServer    Dim oSQLDatabase As New SQLDMO.Database    Dim oSQLTable As New SQLDMO.Table    Dim oSQLColumn As New SQLDMO.Column        Dim i As Integer    Dim liObject As ListItem        ListView1.ListItems.Clear        oSQLServer.LoginSecure = True    oSQLServer.Connect Form1.cboServer1.Text    Set oSQLDatabase = oSQLServer.Databases(Form1.cboDatabase1.Text)    Set oSQLTable = oSQLDatabase.Tables(Form1.cboTable1.Text)        For Each oSQLColumn In oSQLTable.Columns                Set liObject = ListView1.ListItems.Add(, , oSQLColumn.Name)        liObject.SubItems.Add , , oSQLColumn.Datatype        liObject.SubItems.Add , , oSQLColumn.Length        Set liObject = Nothin        Next    oSQLServer.DisConnectSet oSQLServer = NothingEnd Sub

ListView (Report View) - Adding Items
AH! This is embarassing yet very frustrating. The last time I worked with the list view control was a loooong time ago. Unfortunately, I lost that project when my computer crashed (no big deal really, the program was never even completed). At any rate, how the heck do I add subitems and items to a report view listview?!

eg
Column 1 Column 2
Add Item Add Item
Add Item Add Item

ListView (Report View) Numeric Sorting
Hi,

I have a listview control in report view, and I have it so that when I click on a columnheader it sorts the list items by that column, the problem is that when I do that on a numeric column its sorts it like this

1
11
2
3
3100
4
...

I was wondering how can I make it so it sorts the column correctly

1
2
3
4
11
3100

Let me know if you know a way

Thanks In Advance,

Zmei



Edited by - Zmei2004 on 8/29/2004 8:45:42 AM

Last Column Width In Listview (report View)
Hi,


Does anyone know an easy way I can make the width of the LAST column header in a 'report view' listview automatically be equal to the space available.


ie,

if the other columns take up half the width of the listview, the last column takes up the other half.


Similary, if the width of one of the other columns changes, the width of the last column is automatically changed appropiately (so there is never a horizontal scroll bar).


Thanks in advance for any help you can give me.


Tom.

Last Column Width In Listview (report View)
Hi,


Does anyone know an easy way I can make the width of the LAST column header in a 'report view' listview automatically be equal to the space available.


ie,

if the other columns take up half the width of the listview, the last column takes up the other half.


Similary, if the width of one of the other columns changes, the width of the last column is automatically changed appropiately (so there is never a horizontal scroll bar).


Thanks in advance for any help you can give me.


Tom.

How To Add A Thumbnail To A ListView Subitems That Will View In Report Format?
How to add a thumbnail to a ListView subitems that will view in report format?

Editing Selected Item In ListView In Report View
How can I edit the second column of data in a listview control? I am making a properties box much like the one you use in VB. The first column information for each item can not be editable but the second column is going to be the value for each item and I need for it to be able to click and type in it just like in VB (or at least similar to that).

Any help and sample code is appreciated. Thanks.

*solved*I Wanna Learn ListView In Report View
hi this is a new thread after advice on moving from Picture1 to now i believe ListView in Report view is the way to go.

Metallisoft can you help me get his going. I have attached form1 to download and change as i can't get it to work. your reference click here hasnt helped me as it gave me 3 values i only need 2

Database eg
Quote:UNIVERSAL    OEM    MFG
16190    2-1428-HI    WAI
16190    SJ-0001R    AIM
16190    91-25-1030    WILSON
16190    S9024    LUCAS REMAN
16190    9821006350    ISUZU
16190    9821006060    ISUZU
16190    S114-136    HITACHI
16190    S114-100    HITACHI
16190    SR198X    BOSCH REMAN
16190    94022494    GENERAL MOTORS
16190    RXS056    OEX
16190    94021044    GENERAL MOTORS
16190    S114-118    HITACHI I Don't need to display the UNIVERSAL Numbers Just OEM anf MFG only

Code:Private Sub Command3_Click()
Set rs = New ADODB.Recordset 'this will be the rs
Dim strSQL As String 'this the source
         
'make the selection string: filter the records right away
strSQL = "SELECT C.* FROM OEMS AS C where UNIVERSAL in(select UNIVERSAL from OEMS where oem='" & UCase$(Text1) & "')"
                       
' To hold a reference to the current Listitem (row).
Dim oLVItem As MSComctlLib.ListItem

' The (Listview.Width - 350) / 3 simply adjusts the column
' widths to 1/3 the width of the Listview (subtracting the
' width of the scrollbar)
' ListView.ColumnHeaders.Add , , "Supplier", (ListView.Width - 350) / 3 '<- Don't need to work?
ListView.ColumnHeaders.Add , , "OEM", (ListView.Width - 350) / 3
ListView.ColumnHeaders.Add , , "Manufacturer", (ListView.Width - 350) / 3

        
        
        Picture1.Cls
        Picture1.FontSize = 8
        Picture1.Font.Bold = True
        Picture1.Print ">> Supplier Information"
        Picture1.Font.Bold = False
        Picture1.Print "OEM:"; Tab(20); "Manufacturer:"

    rs.Open strSQL, oConnection, adOpenStatic, adLockOptimistic, adCmdText
     
'loop through the recordset
    Do Until rs.EOF
        M19 = rs("OEM") 'Are m19 and m20 properties or local variables? didn't want to take them out, but if they are global settings and there are more records, they will only 'remember' the values in the last record.(No they are strings in a database)
        M20 = rs("MFG")
     
        Picture1.Print M19; Tab(20); M20
        rs.MoveNext
    Loop
     
    rs.Close 'Close the recordset never leave it open!
    Set rs = Nothing 'clear the rs variable

End Sub
  OK NOW how do i replace the Picture1 to ListView in Report view after reading MSDN click here CAN anyone save me? the ColumnHeaders don't display too?





Edited by - Hopeless on 6/4/2004 12:16:16 AM

ListView Control. How Do You Extractupdate Values In Report View
I have populated my ListView control with my values using DAO. I have 10 columns set up in report view. In my code fragment below, I am looking through my listview control searching for rows that the user has selected. Now I need to be able to extract some of the sub values and update others. How do I do this? Here is my code so far.

Private Sub SelectedCountCommand_Click()
Dim i As Integer

For i = 1 To ListView1.ListItems.Count
If ListView1.ListItems(i).Selected = True Then
'extract values from col 3 and 4 and subtract them

'update column 5 based on the results of col 3 minus col 4

End If
Next

End Sub

Help: How To View Selected Items From Listview With Crystal Report Viewer
Hi

I have a Listview with check boxes from it want to view selected items with crystal report viewer.

Private Sub cmdView_Click()
Dim lCustomerId as Long
    Dim tmpItm As ListItem
    For Each tmpItm In lstItems.ListItems
        If tmpItm.Checked = True Then
            lCustomerId = Val(Replace(tmpItm.Key, "C", ""))
          End If
    Next

  End Sub

Plz. help

regards

Loading TreeView And Listview Icons From A Specified Folders Or Files Icons.
Hello,

I am creating a treeview app that looks like windows explorer. Problem is that I do not know how to get the Treeview + Listview icons from the folder or file items being loaded.


Can anyboby help please................................


Thanks

vbBoy.

Loading TreeView And Listview Icons From A Specified Folders Or Files Icons.
Hello,

I am creating a treeview app that looks like windows explorer. Problem is that I do not know how to get the Treeview + Listview icons from the folder or file items being loaded.


Can anyboby help please................................


Thanks

vbBoy.

List View Icons
How can I prevent a user from "moving" or "dragging" the icons within the list view control?

Thanks
VD

Tree View && Icons
I have a tree view and a list of Icons I want to assign to nodes, I have added an image list to the form, and have added to this the Icons I need and the relevant Keys (to match the Tree view).

When I try to assign an Icon to the tree view I get the message, Imagelist must be initialised before it can be used.

what have I done/not done

Thanks

View The Status Of The Icons In Task Bar
I need to know the status of the windows opened on a desktop i.e., whether they are minimised or maximised etc. I should get their status in my application using vb code. Is there anyway to do this? I should get the status of all the icons in the task bar.

Plz help me out..............

Tree View Node Icons
I am new to tree views and I have created a dynamic tree view. Now, I need to assign icons to them depending on their location and status. (Status meaning if expanded or not) Does anyone know how I can check for child nodes and assign a value to the variable that assigns the icon from a ImageList? Thanks, Jeremy

File Icons In A List View.
Have a look at:
http://forums.vb-world.net/showthrea...threadid=19278

Missing List View Icons
I have created a search form so that I can search an access database for different items by different criteria.

For instance, you could search for employees by an agents name, and all the matches appear in the list view. The list view contains information such as name, address etc.

If you are searching for employees, an icon representing an employee appears in the list view. If you are searching for an agent, an agent icon appears in the list view etc.

The first time I do a search, all of the matches have corresponding icons, but subsequent times I do a search only the last few matches have a corresponding icon.

Any ideas why some of the matches don't display the icons?

Seting Desktop To List View Icons?
I was wondering if any one knows how to make the desktop icons 16x16 with the text to the right of the icon. I'v seen some background changers that do it but I would like to make a small system service that dose this.

List View's Habit Of Allowing Icons To Be Dragged
Hopefully a quick question:

I've recently found the list view and have been having fun playing around with it but I dont like the fact that the user can start dragging the icons around the list view. Is there an easy way to disable this, I'd look through the properties but not come up with anything. Any help greatly appreciated! Cheers.

In Crystal Report, Report Is Viewed But Doesnot View Next Page Or Not Any Message Display!
in crystal report, report is viewed but doesn't view next page or not any message display! and surprisingly page no is increased infinitely (up to no limit!, I have checked up to 400+) but next page was not displayed! if I print report , only 1st page is print!

In this report , I have attached 6 subreports!

I hope anybody reply about my problem

Listview - Icons
hello folks,

for my latest project I am working on iw ould like to have a listview (reportstyle) with several items in it. For a more "spreadsheet-like-look" I have the gridlines on.

What I would like to do now is to indicate with an icon what item the user selected. So when the user clicks an item a little arrow-like icon appears before in front of the selected line and the icon disappears on the item that was previously selected.

I was thinking to first remove all the markers and then place a marker on the selected item (this because I don't know a method to check the previously selected Item)

for code I have this:

Code:
Private Sub lsvContracts_Click()
Dim NrOfItems As Integer

'remove marker from previous selected item
NrOfItems = lsvContracts.ListItems.Count

For i = 1 To NrOfItems
lsvContracts.ListItems(i).SmallIcon = 0 'no marker should displayed
Next i

lsvContracts.Refresh

'put marker before selected Item
lsvContracts.SelectedItem.SmallIcon = 2
End Sub
this just doesn't seem to be working, I just don't know what to do next.

Does anybody have an Idea how to solve this!!

Listview Icons
I have icons on a listview but I cant get them to line up beside the listitems :

code:





ListView1.View = lvwReport
ListView1.ColumnHeaders.Add , , "Total Users"
ListView1.ColumnHeaders.Add , , "Members"

For UserLoop = LBound(Usernames) To UBound(Usernames)
Set itmX = ListView1.ListItems.Add(, , Usernames(UserLoop))
ListView1.ListItems.Add , , LivveIcon, , 1
Set itmX = Nothing
Next









Can someone plz help?

Icons In Listview
how can i add an icon in a listview. I've searched the forum already and i have to set the imagelist first in the properties, but they are all empty and i dont know how to add something in it. So can anyone help me with this please, how to put the icons in it, and what to do next from there.

Listview Icons
Hi Everyone,

I have a list view box and I would like to place an Icon on each line.

The list view has subitems so it needs to be viewed in the Report View format.

Any ideas?
BDS

&gt;&gt;&gt; ListView And Icons &lt;&lt;&lt;
Hello, all together!
My problem is that:
When I select an entry with an icon of a ListItem control, the icon is/was selected, too. How can I avoid now, that the icon is selected?



Thanks for Help, Marco.

Listview Icons
i have this code to put as icon in my listview


Code:
ListView1.ListItems.Add() = Text1.Text
ListView1.Icons = ImageList1.ListItems
but it doesn't work.Because is the first time i use this property i don't know nothing so i want help as much as you can

ListView Icons
I'm displaying different types of data in a ListView control. Some data types have icons, some do not. All the data with icons are displayed together and all the data without icons are displayed together after the Listview has been cleared. After displaying data with icons, when data is displayed without icons the text stays shifted to the right as if there was still an icon there. Is there a way to move the text back to the left when no icon is displayed? I've tried setting the view to lvwReport or lvwList and refreshing the ListView control but it hasn't worked. Thanks for the help!

ListView + Icons
Hello, it's me again

I have a ListView control returning a transaction history, with succeeded transactions, transaction warnings and transaction errors. Right now, it's just plain text. I would like to put an icon in front of each line, depending on the type off message (Suc., Warn., Err.). Can I do this in my ListView or would you replace it with a grid ?

Greetz,
Yoda

<font color=green>Do or do not
There is no try</font color=green>

ListView Icons
I've added little up and down arrows to indicate how my listview is sorted. What's bugging me is that I cant figure out how to tell a columnheader object that it is to have no icon: i.e. the listview is sorted by another column. How do I de-select an icon in this instance?

Thanks.

ListView Icons
Hello!

I was wondering if it is possible to add images to a ListView controls without needing an ImageList control.

I am re-writing a program which connects to Amazon and downloads CD/DVD covers. If the user enters an unspecific keyword like "Pink Floyd" for example, a lot of images will be returned in the XML file Amazon provides because there are a lot of CDs and DVDs made by Pink Floyd. Let's say 200 images are available. At the moment, the program operates in the following way:
Connect to Amazon and pass subscription ID, keywords, media type...Fetch the "index" XML file Amazon generated and obtain the total number of pages.Loop though all pages and for each page, loop trough the items and look if an image is available. If an image is available, store the URL in an array.Terminate the connection.If the image URL array is not empty, loop through the array and download all files. After each image was downloaded, load it into the ImageList control.After the ImageList control is full of images, start another loop which adds items to the ListView and connect the ImageList with the ListView so the images appear as thumbnails.As you can see, there are a lot of loops there. While the loops in step 3 cannot be avoided (since I have to loop through all pages and all items of the individual pages), I was wondering if I can somehow avoid the other loops by directly adding an item to the ListView and load an image from the disk (rather than from an ImageList).

Any idea if this is possible?

Regards,
Sebastian

ListView With Icons
Hi

I have a noobi question... how to add icons inside a listview's?

Help - Icons In A Listview
Hey,
I need some help with this. Made a search here in the forum but still can't figure it out.
The Listview View property is Report and I would like to add items to a listview with an icon next to each item. The icon is the same for all items.
The ImageList already holds the Icon. I get error Invalid Key


Code:
.listFiles.ListItems.Add , , FileName, , .ImageList1.ListImages.Item(1)

Thanks

ListView Icons...
How can I get an icon/picture to appear in the listview column header, to the RIGHT of the caption?

At the moment, they are all going to the left, which I don't like...

Listview Icons
I have icons on a listview but I cant get them to line up beside the listitems :


Code:

ListView1.View = lvwReport
ListView1.ColumnHeaders.Add , , "Total Users"
ListView1.ColumnHeaders.Add , , "Members"

For UserLoop = LBound(Usernames) To UBound(Usernames)
Set itmX = ListView1.ListItems.Add(, , Usernames(UserLoop))
ListView1.ListItems.Add , , LivveIcon, , 1
Set itmX = Nothing
Next



Can someone plz help?

Listview Icons...
Yeah so I have a listview. Whenever a certain action is fired I want it to add icons to it right? Well I want it to add and Icon for the ping. When lets say someone joines the channel, it gets their ping.
But whenever it adds it to the listview, it will ALWAYS come out the icon number 21. Also, when I view all of the icons, they sometimes appear all jumbled up and weird looking. Like icons all over the place? Here Is my full code for this action.

VB Code:
Private Sub ee_OnUser(Username As String, Flags As Byte, Message As String, Ping As Integer)main.lchannel.Caption = ""main.lchannel.Caption = main.ee.CurrentChannelDim IconNumber As IntegerDim PingNumber As IntegerDim strRealProduct As StringIf Ping <= 99 ThenPingNumber = 16End IfIf Ping <= 199 ThenPingNumber = 17End IfIf Ping <= 299 ThenPingNumber = 18End IfIf Ping <= 399 ThenPingNumber = 19End IfIf Ping <= 499 ThenPingNumber = 20End IfIf Ping <= 600 ThenPingNumber = 21End IfIf Ping >= 600 ThenPingNumber = 21End If'ignore this stuff it worksIf ReverseString(Left(Message, 4)) = "blaah" ThenIconNumber = 10strRealProduct = "blaah"ElseIf ReverseString(Left(Message, 4)) = "blaah" ThenIconNumber = 7strRealProduct = "blaah"ElseIf ReverseString(Left(Message, 4)) = "blaah" ThenIconNumber = 11strRealProduct = "blaah"ElseIf ReverseString(Left(Message, 4)) = "blaah" ThenIconNumber = 6strRealProduct = "blaah"ElseIf ReverseString(Left(Message, 4)) = "blaah" ThenIconNumber = 14strRealProduct = "blaah"ElseIf ReverseString(Left(Message, 4)) = "blaah" ThenIconNumber = 62strRealProduct = "blaah"ElseIf ReverseString(Left(Message, 4)) = "blaah" ThenIconNumber = 2strRealProduct = "blaah"ElseIconNumber = 64End IfIf Flags = 2 ThenIconNumber = 1End IfIf Flags = 18 ThenIconNumber = 1End IfIf Flags = 16 ThenPingNumber = 22End If'stop ignoringIf main.lchannel.Caption = main.ee.Home Thenmain.lpeople.Caption = main.lvchannel.ListItems.Count + 1AddChat vbCyan, Username, vbRed, " is in " + main.ee.CurrentChannel + " with ", vbCyan, Flags, vbRed, " flags, ", vbCyan, Ping, vbRed, " ping, using, ", vbCyan, strRealProduct, vbRed, "." If IconNumber = 1 Thenmain.lvchannel.ListItems.Add 1, , Username, , IconNumbermain.lvchannel.SelectedItem.ListSubItems.Add , , , PingNumber ElseIf Username = main.ee.Username Thenmain.lvchannel.ForeColor = &H80000004main.lvchannel.ListItems.Add , , Username, , IconNumbermain.lvchannel.SelectedItem.ListSubItems.Add , , , PingNumbermain.lvchannel.ForeColor = &HFFFF& Else With main.lvchannel.ListItems.Add(, , Username, , IconNumber).ListSubItems.Add , , , PingNumberEnd WithEnd IfEnd If End Sub

I know for a fact that my icon code numbers are right in the ImageList. Thanks for your help.

Big Icons In Listview
Hey guys!

I am having a bad time with listview.

I can put data inside of list view without trouble.

I created an imagelist and I put 2 icons inside of it, and I made the listview get both images from imagelist and show beside of the name of each column ( I have 2). The problem are 2:

1- The icons are very very big beside the name of each column

2- Each registry in the list view are receiving an icon too....And I dont want... =-(

Here is my code


VB Code:
Private Sub ConfiguraLv()Set ListView1.ColumnHeaderIcons = ImageList1Set ListView1.Icons = ImageList1Set ListView1.SmallIcons = ImageList1Dim clmx As ColumnHeaderSet clmx = ListView1.ColumnHeaders.Add(, , "column 1", , , 1)Set clmx = ListView1.ColumnHeaders.Add(, , "column 2", , , 2)Dim itmx As ListItemSet itmx = ListView1.ListItems.Add(, , "data1(0)", , 1)itmx.SubItems(1) = "data1(1)"End Sub


Thanks for your time,

Elminster

Icons And Listview
Hi there,

I am able to fill a listview and show an icon on each listitem.

Now I want to show a different icon when the user selects a particular listitem in the listview.

Does anybody know how to do this?


Many thanx!

Listview Icons
I am using a listview for the data i retrieve from my sql server.

When i retrieve the information i want to give every brand there own logo(icon).

So for example: when i retrieve 'NIKE', the listview have to put the nike icon from my imagelist in the listview. But what if i retrieve 2 different brands like 'NIKE' and 'ADIDAS', how can i give them the good icons?

this is my current code:


VB Code:
While Not rs.EOF         Set itmX = lv.ListItems.Add(, , "" & rs(0), , 3)         itmX.SubItems(1) = "" & rs(1)         rs.MoveNextWend

Icons In ListView
Hi
I have a listview with 3 columns in it. column1 holds a name, column2 holds a phone number, column3 holds a subject. I want to put an icon next to the subject in column3. How is this done?
Thanking you in advance
PORRASTAR

Copyright © 2005-08 www.BigResource.com, All rights reserved