Is there anyway to remove an element from a table in gtk2hs?
Say I have a table containing Label widgets, can I remove (or access in =
anyway, for example to update) the Label widget at position (x,y) in the =
Thanks for your help,
From: Axel Simon <A.Simon@ke...> - 2004-01-20 09:33:19
On Mon, Jan 19, 2004 at 08:17:55PM -0000, Chris Taylor wrote:
> Is there anyway to remove an element from a table in gtk2hs?
> Say I have a table containing Label widgets, can I remove (or access in anyway, for example to update) the Label widget at position (x,y) in the table?
a) you are using the functions in mogul/. Then adding an Attribute to a
list/tree database (aka ListStore/TreeStore) returns a function to read and
to write an entry at a ListIter or TreeIter. See demo/treeList/TreeList.hs
b) you are using the bare metal in gtk2hs/. The module TreeModel which
captures functionality common to ListStore and TreeStore contains a
functions called treeModelGetValue which returns a GenericValue. If you have
a widget at a position, you get a GObject from this position (see
glib/GValue.chs). You need to call castToLabel from Hierarchy on it.
Hope this helps,
apologies for the messy interface,