Re: FileSelection



On Wed, 2003-03-05 at 09:35, Jean-Marc Frigerio wrote:
Hi,
I use the wonderfull Gtk::FileSelection ; and I nearly succeed in doing what I 
want but now I would like to connect the button of a CList 
(Gtk::FileSelection->file_list)


from a quick perusal of the docs (i'm late for work):

       Gtk::Widget $clistâ>get_column_widget ($column)

looks like it gives you access to a particular GtkCListColumn.  one of
the members of the GtkCListColumn (according to the C docs) is
"button".  you should be able to connect any signal handler to "clicked"
on this widget.

unfortunately, there is no mention of CListColumn or even Column in
Gtk::reference. so it looks like you either get to hack at the C source
for the perl bindings, or try a little black magic (see if you can
decompose the widget returned by get_column_widget to find the button).



that said, the only really useful thing to do with the button atop a
clist column is changing the sort order, which i thought GtkCList is
supposed to be able to do for you (i may be mistaken).  what did you
have in mind?



also keep in mind that code you write around the CList for Gtk+ 1.2 will
be pretty much thrown away if/when you move to Gtk+ 2.x, whose file
selector uses GtkTreeView/GtkListModel.  (i spent a good three hours
last night hacking up a gimp-like image preview pane in a
GtkFileSelection for a C app...)


-- 
muppet <scott asofyet org>




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]