[Gtk-sharp-list] [Mono GTK#] Bind Class object to TreeView

Andy York andy at brdstudio.net
Thu Sep 19 10:16:32 UTC 2013


For one thing you don't have any cell renderers added to the treeview volume. The cell renderers are what actually display any values not the columns. Every one who comes from winforms to gtk has the same headache, those that fight through the frustration seems to end up loving the way the treeview works in the end.  Stick with it and we'll help you get past the frustration.
-- 
Sent from my Nexus 7, typing with my thumbs makes it easy to make errors & is painfully slow, please excuse my brevity.

jaymarvels <jacob.spencer80 at googlemail.com> wrote:
>My treeview is still blank and empty...no column headers or anything :(
>On 18 Sep 2013 23:04, "Andrey Gankov [via Mono]" <
>ml-node+s1490590n4660913h13 at n4.nabble.com> wrote:
>
>> 18.09.2013 19:41, jaymarvels пишет:
>>
>> > I've googled this for the last 5 hours and tried evey "tutorial"
>under
>> the
>> > sun that google brings back to me..
>> >
>> > In winforms I can create a List from my class and bind that to my
>> listview,
>> > no problems..
>> >
>> > In gtk# its not so simple.
>> >
>> > I have my class, with my objects, I even have my List.
>> >
>> > I can transfer my class into a ListStore.
>> >
>> > I have dragged a TreeView widget into a box widget and am having
>really
>> > issue's populating it.
>> >
>> > I can't even make any headers appear when doing;
>> >
>> >
>> > teamListView = new Gtk.TreeView ();
>> > //add in cols
>> > Gtk.TreeViewColumn fNamecol = new Gtk.TreeViewColumn ();
>> > fNamecol.Title = "First Name";
>> > Gtk.TreeViewColumn sNamecol = new Gtk.TreeViewColumn ();
>> > fNamecol.Title = "Second Name";
>> >
>> > teamListView.AppendColumn (fNamecol);
>> > teamListView.AppendColumn (sNamecol);
>> >
>> > Gtk.ListStore nameListStore = new Gtk.ListStore (typeof(string),
>> > typeof(string));
>> > teamListView.Model = nameListStore;
>> >
>> >
>> > Its blank..nothing..i'd expect at the minimum to see 2 column
>headers.
>> >
>> > Is there anyone, or anything which can give a simple step by step
>way of
>> > creating a treview that shows simply 2 columns.
>> >
>> >
>> >
>> > --
>> > View this message in context:
>>
>http://mono.1490590.n4.nabble.com/Mono-GTK-Bind-Class-object-to-TreeView-tp4660910.html
>> > Sent from the Mono - Gtk# mailing list archive at Nabble.com.
>> > _______________________________________________
>> > Gtk-sharp-list maillist  -  [hidden
>email]<http://user/SendEmail.jtp?type=node&node=4660913&i=0>
>> > http://lists.ximian.com/mailman/listinfo/gtk-sharp-list
>> >
>> >
>> I think you need add to end
>> teamListView.ShowAll();
>>
>> --
>> Andrey Gankov
>> Mail:[hidden email]
><http://user/SendEmail.jtp?type=node&node=4660913&i=1>
>> ICQ: 230-684-976
>> Jabber:[hidden
>email]<http://user/SendEmail.jtp?type=node&node=4660913&i=2>
>>
>> _______________________________________________
>> Gtk-sharp-list maillist  -  [hidden
>email]<http://user/SendEmail.jtp?type=node&node=4660913&i=3>
>> http://lists.ximian.com/mailman/listinfo/gtk-sharp-list
>>
>>
>> ------------------------------
>>  If you reply to this email, your message will be added to the
>discussion
>> below:
>>
>>
>http://mono.1490590.n4.nabble.com/Mono-GTK-Bind-Class-object-to-TreeView-tp4660910p4660913.html
>>  To unsubscribe from [Mono GTK#] Bind Class object to TreeView, click
>here<http://mono.1490590.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4660910&code=amFjb2Iuc3BlbmNlcjgwQGdvb2dsZW1haWwuY29tfDQ2NjA5MTB8OTg5MTAwMjg=>
>> .
>>
>NAML<http://mono.1490590.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>>
>
>
>
>
>--
>View this message in context:
>http://mono.1490590.n4.nabble.com/Mono-GTK-Bind-Class-object-to-TreeView-tp4660910p4660915.html
>Sent from the Mono - Gtk# mailing list archive at Nabble.com.
>
>------------------------------------------------------------------------
>
>_______________________________________________
>Gtk-sharp-list maillist  -  Gtk-sharp-list at lists.ximian.com
>http://lists.ximian.com/mailman/listinfo/gtk-sharp-list
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/gtk-sharp-list/attachments/20130919/7cca3305/attachment-0001.html>


More information about the Gtk-sharp-list mailing list