Thanks for your reply
MSDN suggests the following (not tried it myself, but i solved the problem
in my app)
// Draws the backgrounds for entire ListView items.
private void listView1_DrawItem(object sender,
DrawListViewItemEventArgs e)
{
if ((e.State & ListViewItemStates.Selected) != 0)
{
// Draw the background and focus rectangle for a selected item.
e.Graphics.FillRectangle(Brushes.Maroon, e.Bounds);
e.DrawFocusRectangle();
}
else
{
// Draw the background for an unselected item.
using (LinearGradientBrush brush =
new LinearGradientBrush(e.Bounds, Color.Orange,
Color.Maroon, LinearGradientMode.Horizontal))
{
e.Graphics.FillRectangle(brush, e.Bounds);
}
}
// Draw the item text for views other than the Details view.
if (listView1.View != View.Details)
{
e.DrawText();
}
}
Family Tree Mike said:
Since the DrawItemState enumeration has a flags attribute, the values can
be
"or'ed" together. This could occur regardless of the OS version. It
appears
the defaults, probably due to visual styles or themes, are different
between
the OS's in question.
barry said:
if you echo the e.state.ToString() of the drawitem event it shows
"None" or "Selected" in Windows 2003
"NoAccelerator, NoFocus" or "Selected, NoAccelerator, NoFocusRect" in
Windows XP
Hi barry,
Hmmmm... for instance, like this
http://www.codeproject.com/KB/combo...osition&view=Quick&select=1953419#xx1953419xx
Regards,
Alex Meleta [Tech Blog:
http://devkids.blogspot.com]
b> Hi
b> b> is the drawitemstate of drawitem method of comobox defferent for
b> Windows XP and Windows 2003, how does one solve such problems
b> b> TIA
b> Barry