[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: text from GList item?
From: |
Paul Emsley |
Subject: |
Re: text from GList item? |
Date: |
Mon, 11 Dec 2006 10:22:44 +0000 |
On Sat, 2006-12-09 at 06:41 +1100, Kevin Ryde wrote:
> Paul Emsley <address@hidden> writes:
> >
> > I want to get to the text/string of the list of items in a combo-box:
> > So, it is not clear to me what I should substitute for xxx in the
> > following... can you help?
> >
> > (let ((combo-list (gtk-combo-list my-combo-box)))
> > (let ((children (gtk-container-children combo-list)))
> > (map (lambda (c) (format #t "~s~%" (xxx c)))
> > children)))
>
> I think the children are GtkListItem's, each of which has a single
> GtkLabel child, so
>
> (define (xxx c)
> (gtk-label-get (car (gtk-container-children c))))
>
> (Or gtk-bin-get-child in gtk 2.)
Thanks, it didn't occur to me to use gtk-container-children twice :-/
That worked just fine.
Paul.