[MonoDevelop] Adding A ListView To A TreeView in MonoDevelop
opensource at site7even.de
Wed Nov 2 14:30:11 EDT 2011
as nobody else answered you in the meantime, I will tell you what I found
out, starting from zero with MonoDevelop with only .NET knowledge in mind.
But be aware that I count myself to beginner level refering to mono (which
was the reason I waited to reply...)
For what I found out, you can not assign any kind of DataStore to a
TreeView from within the GUI. You have to do this programmatically.
To begin with a really simple TreeView layout there is a lot of steps to
do (nearly everything from the tutorial you referenced), so it is not easy
to "just display" something.
First, I was really angry about that complex code I had to write for a
simple stupid list. But in the end I realized that this brings maximum
flexibility to the TreeView.
It becomes really smart when you connect custom typed collections (or
similar) to a TreeView, adapting the data via TreeCellDataFunc's. This
allows you to directly display your data without converting via
Coming back to your story, I assume you edited the designer's
MainWindow.cs - use the normal MainWindow.cs instead where you place your
normal code in, then the content from the tutorial will work!
Am 27.10.2011, 23:57 Uhr, schrieb crokett <crokett at gmail.com>:
> I am learning MonoDevelop and C# as I go. I am trying to add the
> equivalent of a listbox to the main window of my app. I don't see a
> widget but found this tutorial which explains how to create a list view
> using a treeview:
> My issue is the properties under the GUI designer don't allow me to add a
> ListStore or a TreeViewColumn to the Treeview, nor can I set the model.
> I edit the MainWindow.cs file directly, those changes get wiped out on
> next build. How can I make the changes so they are persistent and I get
> columns I want in the treeview? Or is there a way to do this through the
> View this message in context:
> Sent from the Mono - MonoDevelop IDE mailing list archive at Nabble.com.
> Monodevelop-list mailing list
> Monodevelop-list at lists.ximian.com
www.site7even.de | www.nskcomputing.de
More information about the Monodevelop-list