Post by altair on Mar 2, 2015 22:01:12 GMT 10
Hello Folks,
I would like to know how to accomplish a advance list view like on Nuget Package Manager thingy on Visual studio 2012 and above. Like a list view with icons a bunch of labels etc.
Altair - The Flying One
|
|
Post by Imformas on Mar 2, 2015 22:14:57 GMT 10
You can draw the items,with your own design using 'OnDrawItem' method
Programming language'sCSharpC++CObjective-CVBProject'sSharpMediaSharpEditYoutifygithub.com/Stephen-Fox-0
|
|
Post by Prezence on Mar 2, 2015 22:20:54 GMT 10
If you want images, you can use the ImageList property on the listview.
Check out our website here. Check out AirBrowse here. Follow us on GitHub here.
|
|
Post by altair on Mar 3, 2015 3:50:49 GMT 10
Chris,
I also want some labels. You know. And One More thing, Can I create my own ListBox control. But without inheriting from ListBox. Or By Inheriting ListBox but I don't need some properties.And I need to add some of mine.
I will try out Imformas's Suggestion in a moment
Thanks, Altair - The Flying One
|
|
Post by Imformas on Mar 3, 2015 4:41:13 GMT 10
you can make your own listbox without inheriting listbox, just inherit listControl
Programming language'sCSharpC++CObjective-CVBProject'sSharpMediaSharpEditYoutifygithub.com/Stephen-Fox-0
|
|
Post by Prezence on Mar 3, 2015 9:33:53 GMT 10
The easiest way then is to create a UserControl with a flowlayoutpanel dock filled. Call it "MyBox" or something like that. Add a ReadOnly Property called "Items" that will return a list of the Flowlayoutpanel's controls. like so: Public ReadOnly Property Items as List(of Control) 'or "MyItem" (below) Get dim l = new list(of control) for i = 0 to flowlayoutpanel.controls.count - 1 l.add(flowlayoutpanel.controls(i)) Next return l End Get End Property
Then create a usercontrol called (for example) "MyItem". Place a label and picturebox on the "MyItem" to show text and image (or just handle the paint event and draw on the text and stuff). You can make that so it must be set in the constructor (if you wish). Then you can drop a "MyBox" on the form and in the code call MyItem.Flowlayoutpanels.controls.add(new MyBox)
Check out our website here. Check out AirBrowse here. Follow us on GitHub here.
Last Edit: Mar 3, 2015 9:35:42 GMT 10 by Prezence
|
|
Post by Imformas on Mar 3, 2015 21:30:13 GMT 10
but whats the point in creating a that, you might as well just paint the image/text on yourself using the 'OnDrawItem' its much easyer and faster. that Prezence 's idea
Programming language'sCSharpC++CObjective-CVBProject'sSharpMediaSharpEditYoutifygithub.com/Stephen-Fox-0
|
|
Post by Prezence on Mar 3, 2015 22:23:44 GMT 10
Chris, I also want some labels. You know. And One More thing, Can I create my own ListBox control. But without inheriting from ListBox. Or By Inheriting ListBox but I don't need some properties.And I need to add some of mine. I will try out Imformas's Suggestion in a moment Thanks, Altair - The Flying One Yes Imformas but he said above, what about creating it without inheriting from listbox^. Also, if you were going to put any buttons on the items, it would be MUCH easier because you can contain it all inside a usercontrol class.
Check out our website here. Check out AirBrowse here. Follow us on GitHub here.
|
|
Post by Imformas on Mar 3, 2015 23:08:32 GMT 10
well all im saying is that the easyest way to do that ^ is to inherit listbox and use OnDrawItem method
Programming language'sCSharpC++CObjective-CVBProject'sSharpMediaSharpEditYoutifygithub.com/Stephen-Fox-0
|
|