Re: EuGTK:How to Build a TreeView

new topic     » goto parent     » topic index » view thread      » older message » newer message
       "Measuring & Layout Tools", 
        { 
          "Loading..." 
        } 
      } 
    } 
  ,-- there was an extra curly around here; 
  { 
    "Toys & Games", 
    { 
      "Loading..." 

You probably already have done this, but I needed to add a scroller for the treeview to live in, so the window doesn't run off the bottom of the screen:

constant    
    win = create(GtkWindow,"size=250x400,border=10,$destroy=Quit"),   
    panel = create(GtkBox,"orientation=vertical,spacing=10"),   
    btn1 = create(GtkButton,"gtk-quit","Quit"), 
    scrl = create(GtkScrolledWindow),   
    box = create(GtkButtonBox)   
   
    add(win,panel)   
    pack(panel,scrl,1,1) 
    add(scrl,tv) 
    add(box,{btn1})   
    pack(panel,-box)   
       
show_all(win)  
main()   

Thoughts: if I had a list this long - and it appears that it will get much longer as categories are filled in - I would try to write a program or a routine to pre-process the list, working from some easier format. Tabbed text, perhaps?

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu