Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

okay, so here is my delima. I have a listview that does not want to play nice. It will not let me size the images when they are displyed. They are just very tiny. Here is my code:

 

'begin code

Dim iL As New ImageList

Dim iM As New IconManager

iL = iM.Load_Order_Status_Icons 'adds icon images to the array

iM = Nothing

 

lstStatus.SmallImageList = iL

lstStatus.SmallImageList.ImageSize = New Size(32, 32)

 

lstStatus.Columns.Add("Status Type", 200, HorizontalAlignment.Left)

lstStatus.Columns.Add("Status Code", 100, HorizontalAlignment.Left)

lstStatus.Columns.Add("Description", 100, HorizontalAlignment.Left)

 

Dim sC As New StatusMaster

Dim rArray() As String

rArray = sC.List_Status_Codes

If Not rArray Is Nothing Then

Dim mF As Integer = 0

Dim tStr() As String

For mF = 0 To rArray.GetUpperBound(0)

tStr = Split(Trim(rArray(mF)), ",")

lstStatus.Items.Add(Trim(tStr(0)), 0)

lstStatus.Items(mF).SubItems.Add(Trim(tStr(1)))

lstStatus.Items(mF).SubItems.Add(Trim(tStr(2)))

Next

End If

sC = Nothing

'end code

 

I have another listview with identical setting (I copied the object) and use similar code (only the for statement is different) and it plays nice. Any ideas?

 

Scott

 

ps. Thank you to anyone who responds but please don't email to me, I have lycos and have a restricted email acceptance list due to all of the spam that lycos allows. Sorry.

Posted

I have the listview set to details so it should be using the smallimagelist. That being said, I did try setting up the largeimagelist seperately and concurrently only to acheive the same results. I've been testing every scenario I can come up with for about three hours now but this one has me stumped. Thanks for the response.

 

Scott

  • *Experts*
Posted
The report-view in ListView will only let you use small icons. You can't resize the items to make them 32-pixels high, unless you feel like getting into some messy hooking and subclassing (which you don't... trust me). Maybe I misunderstood you.
Posted

ListView has detail,smallicon,largeicon and list views. Which do you mean by Report? I am using the detail view in another listview object on the same form (different tab) and it lets me size the images very easily. listview.smallimagelist.imagesize = new size(32,32) works every time on the other listview object, but not this one. hmmmmm.........

 

Scott

  • *Experts*
Posted
Detail view is report view, sorry. I'm still not understanding what your problem is. Can you attach a small screenshot of the listview after the icons are correctly sized?
Posted

Sorry for the delay, I don't work weekends.

 

Good:

 

http://www.northbaydistribution.net/asp/goodiconsize.gif

 

Bad:

 

http://www.northbaydistribution.net/asp/badiconsize.gif

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...