Trying to make tables in mono develop -


i started using monodevelop , having hard time design forms. have understood concept of widgets inside containes. trying table inside scroll view. table should have 3 columns , should able set column names.

i have looked @ documentation mono develop shows how use node view same haven't been able figure out why coming in new window , how on first screen itself.also there way can drag , drop form make columns , table header? have attached code :

using system; using gtk; namespace imagecompressiontool {     class mainclass     {         public static void main (string[] args)         {             application.init ();             mainwindow win = new mainwindow ();             win.show ();             application.run ();              gtk.application.init ();             nodeviewexample win1 = new nodeviewexample ();             win1.show ();             gtk.application.run ();          }      }     public class mytreenode : gtk.treenode {          string song_title;          public mytreenode (string artist, string song_title)         {             artist = artist;             this.song_title = song_title;         }          [gtk.treenodevalue (column=0)]         public string artist;          [gtk.treenodevalue (column=1)]         public string songtitle {get { return song_title; } }      }      public class nodeviewexample : gtk.window {         gtk.nodestore store;         gtk.nodestore store {             {                 if (store == null) {                     store = new gtk.nodestore (typeof (mytreenode));                     store.addnode (new mytreenode ("the beatles", "yesterday"));                     store.addnode (new mytreenode ("peter gabriel", "in eyes"));                     store.addnode (new mytreenode ("rush", "fly night"));                 }                 return store;             }         }          public nodeviewexample () : base ("nodeview")         {             setsizerequest (200,150);              // create our treeview , add our child widget             gtk.nodeview view = new gtk.nodeview (store);             add (view);              // create column title artist , bind renderer model column 0             view.appendcolumn ("artist", new gtk.cellrenderertext (), "text", 0);              // create column title 'song title' , bind renderer model column 1             view.appendcolumn ("song title", new gtk.cellrenderertext (), "text", 1);             view.showall ();         }      }   } 

kindly me out. thanks!

if want nodeview window displayed remove code showing mainwindow. main method showing 2 windows. if want show nodeviewexample window should like:

    public static void main (string[] args)     {         gtk.application.init ();         nodeviewexample win1 = new nodeviewexample ();         win1.show ();         gtk.application.run ();     } 

you cannot drag , drop columns gtk.nodeview or gtk.treeview designer.


Comments

Popular posts from this blog

1111. appearing after print sequence - php -

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

Ruby on Rails, ActiveRecord, Postgres, UTF-8 and ASCII-8BIT encodings -