Re: EuGTK - change column label?

new topic     » goto parent     » topic index » view thread      » older message » newer message
Jerry_Story said...

I got EuGTK_4.2.2 happening.

The next problem is to change the label on a column in a list. In wxEuphoria, it is:
set_column_label(list, column, string)

I tried:
set(list,"title",column,string)

But
'GtkTreeView' has no property named `title'

That's 'cause a TreeView doesn't have a 'title' property, and if it did, that's not what you are wanting to change anyway :)

To change a column's title - just get the column you want to change from the treeview like so:

atom column = get(tv,"column",1) -- column 1 is actually the second column, thanks to C! 
set(column,"title","Foo!") 

Hmm... ok, just for fun, instead of changing the title to some plain old text, let's put an animated gif in there instead:

constant img = create(GtkImage,"tiphat.gif") 
atom column = get(data,"column",3) 
set(column,"widget",img) 
show(img) 

Works fine. Might even be useful. Put a blinking down-arrow in the column your user is supposed to be selecting from perhaps?

Exciting Screenshot

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

Search



Quick Links

User menu

Not signed in.

Misc Menu