jixer Posted October 17, 2003 Posted October 17, 2003 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. Quote
*Gurus* divil Posted October 17, 2003 *Gurus* Posted October 17, 2003 Could it be that you are assigning to the SmallImageList property and not the LargeImageList property? I assume the imagelist you're binding to has images of a large size. Quote MVP, Visual Developer - .NET Now you see why evil will always triumph - because good is dumb. My free .NET Windows Forms Controls and Articles
jixer Posted October 17, 2003 Author Posted October 17, 2003 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 Quote
*Experts* Volte Posted October 17, 2003 *Experts* Posted October 17, 2003 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. Quote
jixer Posted October 17, 2003 Author Posted October 17, 2003 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 Quote
*Experts* Volte Posted October 17, 2003 *Experts* Posted October 17, 2003 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? Quote
jixer Posted October 18, 2003 Author Posted October 18, 2003 sure, what format would you prefer? Quote
*Experts* Volte Posted October 18, 2003 *Experts* Posted October 18, 2003 GIF or JPG will be fine. Quote
jixer Posted October 20, 2003 Author Posted October 20, 2003 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 Quote
*Experts* Volte Posted October 20, 2003 *Experts* Posted October 20, 2003 Are the images in the top one icons? If so, are there any other sizes of icon inside the same file? Same with the bottom one. Quote
jixer Posted October 20, 2003 Author Posted October 20, 2003 All are icons created by the same program using the same settings. They are all in fact the same size both height, width and file kb size. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.