c# - Using User Control inside Listbox or Listview on WinForms -


so ive created user control looks this

enter image description here

it has labels , picturebox on it. want use control inside listbox or listview using user control representation inside list. can add items listbox as:

listbox1.items.add(usercontrol1);

and before using listbox as:

private void ownerlist_drawitem(object sender, drawitemeventargs e)     {         // item's journeypackage drawn.         listbox listbox = sender listbox;         vehicle vehicle = (vehicle)listbox.items[e.index];          e.drawbackground();          //call customdraw method journeypackage class.         vehicle.drawitemresume(e.graphics, e.bounds, this.font);     } 

but hard task have use graphics class draw.

so decided create user control , make listbox or listview of them, , able see list of image 1 post. using property drawmode listbox ownerdrawvariable im not sure if solution.

you can use control

objectlistview


Comments

Popular posts from this blog

angular - Is it possible to get native element for formControl? -

unity3d - Rotate an object to face an opposite direction -

elasticsearch python client - work with many nodes - how to work with sniffer -