I'm writing an C# App (WinForm) with a ListBox having content added by the user. Now, I could have a ordinary button under the ListBox to remove items, but I would like to have the button right next to the content, thus being inside of the ListBox.
Like this:
The problem is that I lack experience in .NET so I have no clue on how this would be possible with all the automated controls going on. I've googled it, but came up with no meaningful results.
Any hints, clues or snippets for achieving this are welcome! :)
Instead of ListBox you can use ListView, ListView has the ability to add custom column types.
So one could make a custom control but for my app it isn't really worth the trouble.
What I did was to create a DataGrid, made it resemble a ListView but with its own flare. I did this because the DataGrid already has a buttoncontrol built in to its cells.
Yes I know, kind of fugly "hack", but it works like a charm! :)
Props to Shay Erlichmen who led me into thinking outsite my ListBox. See what I did there? ;)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With