1. Please use http://dotnetdevelopment.pastebin.com/ for anything longer than 2 or 3 lines of code. 2. Are you initializing the image list you mention but I don't seem to see in your avalanche of code? 3. Are you setting the state image index manually under the circumstances you're describing of a disappearing image? Are you certain there's an image at the index specified in the appropriate imagelist? 4. Do you need a LargeImageList as well by any chance?
∞ Andy Badera ∞ +1 518-641-1280 ∞ This email is: [ ] bloggable [x] ask first [ ] private ∞ Google me: http://www.google.com/search?q=andrew%20badera On Tue, Sep 15, 2009 at 10:00 AM, Jarppi <[email protected]> wrote: > > This is the bulk of the procedure which populates the ListView: > > ListViewItem lvi = new ListViewItem(); > lvi.SubItems.Add(fileName); > lvi.SubItems.Add(FileName); > lvi.ImageIndex = 0; > lvi.StateImageIndex = 0; > lvi.ToolTipText = fileName; > > //Prevent duplicate items adding. > if (lvExportedCards.Items.Count == 0) > { > lvExportedCards.Items.Add(lvi); > } > else > { > foreach (ListViewItem x in lvExportedCards.Items) > { > if (x.ToolTipText == lvi.ToolTipText) > { > break; > } > else > { > lvExportedCards.Items.Add(lvi); > } > } > } > > And this is the code on the DoubleClick event: > > foreach (ListViewItem d in > lvExportedCards.SelectedItems) > { > SessionData.AddData("CurrentBudgetCard", d.SubItems > [2].Text); > LoadBudgetCard(d.SubItems[2].Text); > } > > On Sep 15, 3:56 pm, Andrew Badera <[email protected]> wrote: >> Show us your code. >> >> ∞ Andy Badera >> ∞ +1 518-641-1280 >> ∞ This email is: [ ] bloggable [x] ask first [ ] private >> ∞ Google me:http://www.google.com/search?q=andrew%20badera >> >> >> >> On Tue, Sep 15, 2009 at 7:15 AM, Jarppi <[email protected]> wrote: >> >> > Hi All >> > I have a ListView on a Windows form, in Details view I've got an >> > SmallImageList bound to the control, and the icons show up fine. >> > However, when I select the item, the icon disappears!! When I deselect >> > it, it's back. So I thought it may have something to do with >> > StateImages, but after adding a StateImageList, and specifying a >> > stateimageindex on my ListViewItem, still nothing! It's driving me >> > crazy, can anyone help? >> >> > Thanks. >
