I have a listbox of which I have overrode the 'DrawItem' event to
display an image.
So I have a function as follows:
private void DrawItemHandler (object sender, DrawItemEventAr gs e)
{
Bitmap img = new Bitmap("cross.g if");
e.DrawBackgroun d();
e.DrawFocusRect angle();
Image i = img;
e.Graphics.Draw Image(i, new Point(e.Bounds. X,
e.Bounds.Y));
}
-
What I want is a button which will scan all items in the listbox,
check to see whether the item exists in the database, and then change
the image accordingly ("tick.gif") .
-
What is the best method of doing this?
I can check which the image should be easily enough, but i cant pass a
value to the DrawItemHandler . Or can I?
display an image.
So I have a function as follows:
private void DrawItemHandler (object sender, DrawItemEventAr gs e)
{
Bitmap img = new Bitmap("cross.g if");
e.DrawBackgroun d();
e.DrawFocusRect angle();
Image i = img;
e.Graphics.Draw Image(i, new Point(e.Bounds. X,
e.Bounds.Y));
}
-
What I want is a button which will scan all items in the listbox,
check to see whether the item exists in the database, and then change
the image accordingly ("tick.gif") .
-
What is the best method of doing this?
I can check which the image should be easily enough, but i cant pass a
value to the DrawItemHandler . Or can I?
Comment