How can I have my listbox have columns?
I want my ListBox to have columns, and one of those columns have to be a clickable URL.
How can开发者_Python百科 I achieve this?
You can't do it in a ListBox. You can create your own control, or settle for another existing one. Based on the question, I'd guess you're not yet at the stage where you're creating your own controls. That takes a pretty good understanding of existing controls and the way they work under the covers (but a google search for creating Winforms Controls should yield plenty of instructions.) Edit added It looks like te 4th and 5th links in combination on that google search should get you what you need. You can create your own user control and then do an array of them)
As far as for other possible alternatives, have you considered a DataGridView? A DataGridView can have a hyperlink and it can have checkbox columns, so this would be one possible alternative.
Here's a link for having a Hyperlink column in a DataGridView.
Well, it is possible by using the CustomTabOffsets property (unreliable) or the DrawItem event. And implementing the MouseDown event to find out if that particular 'column' was clicked.
But there's little point, a ListView control with View = Details gives you the same functionality.
精彩评论