Menu
  • HOME
  • TAGS

how can I know which Item was selected in listview + imagelist

c#,winforms,listview,selecteditem,imagelist

I don't know the type of b so the example is using the 2 known attributes id and string assuming that are an int and a string respectively . Just change them for your containing class. First you need to create your own ListViewItem, to support show the name on...

DataGridViewImageColumn Image layout doesn't work

c#,datagridview,imagelist,datagridviewimagecolumn

Start by checking the gImageList.Imagesize! It's default will use square image sizes of 16x16! Change that to the size of your Images before you load them: gImageList.ImageSize = new Size(61,12); Note that all Images need to have the same size. If they haven't you should change them; much better than...

How to index image list by name instead of position?

c#,combobox,windows-forms-designer,imagelist

Just use imageList1.Images[comboBox1.SelectedItem.ToString()]; remove any breakbpoint or messagebox...

Loading ListView and ImageList while using a backgroundWorker

c#,listview,backgroundworker,imagelist

You should move all the code that tries to access the Listview AND the ImageList outside the DoWork event and use the ProgressChanged event raised inside the DoWork code. In this way the code inside the ProgressChanged event is executed in the correct UI thread (assuming that the BackgroundWorker is...

32-bit images on ImageList

c#,image,winforms,alpha-transparency,imagelist

From the proof of concept you posted, I figured out a simple way to make it work. Basically, you have to define the ImageList in the WinForms designer. In order to provide a complete answer, here are all the steps I've taken to make it work: In the designer view...

VB.NET Out of Memory Issue on ImageList

vb.net,listview,memory-management,imagelist

[SOLVED] Creating a copy of the image and resizing the copied image to a bitmap thumbnail size then adding it to the ImageList(). After adding, dispose the original image and the bitmap copy. I will post the code to help others who have the same issue. Dim item As New...

Show filename in listView and imagelist. Show filename of selected item

c#,listview,listviewitem,imagelist

Ok I think I've simplified some of the other answers. With this way I'm able to get the filename to show up under the image. Also when the image is selected I'm able harness it. I'm using the item.tag to hold the file name. private void GetImages() { DirectoryInfo dir...

Unable to Set Overlay Image for CListCtrl

c++,winapi,mfc,overlay,imagelist

Jonathan Potter was correct that I needed to include the ILC_MASK flag in order for SetOverlayImage() to returns a value that indicates success. However, of all the documentation I could find online, nothing provided a complete description of how to do this. I didn't find a single source, for example,...

Efficient use of (or alternative to) System.IO.MemoryStream

vb.net,memorystream,imagelist

Ok, I've found a solution/workaround that seems to work - call the PopulateImageStyles sub when a user visits the specific TabPage the ImageList resides on. For some arbitrary reason, when run this way (as above, when called on the form), the process never proceeds to consume more than 50-60 MB...

Images in a ListView with text below them

c#,listview,imagelist

TaW was certainly right with his answer, However, the problem with View=LargeIcon was that the spacing between items is too large, And I wanted to use View=Tile at first since there's no spacing between the items. So, after a little research I did about this, I came up with a...