Listbox items color change Programming Software Development by Mekonom ….Bounds.Height - delta); // Console.WriteLine(e.State.ToString()); // Setup the stringformatting object StringFormat sf = new StringFormat(); sf.Alignment = StringAlignment.Near; // Get… DrawItemEventArgs index is -1? Programming Software Development by jackabascal ….Bounds.Y, e.Bounds.Width, e.Bounds.Height); // Setup the stringformatting object StringFormat sf = new StringFormat(); sf.Alignment = StringAlignment.Near; // Get… Re: DrawItemEventArgs index is -1? Programming Software Development by Geekitygeek Have you tried checking the index before attempting to access it? In fact, if index is -1 then you can skip the whole method since you are trying to draw an item that isnt in the list so: [CODE] private void Browsers_DrawItem(object sender, System.Windows.Forms.DrawItemEventArgs e) { if(e.Index<0) return; //rest of …