[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
how to get value from combo
From: |
Maarten Grachten |
Subject: |
how to get value from combo |
Date: |
Wed, 1 Dec 2004 12:49:57 +0100 (CET) |
Hi,
I just started with guile-gnome and made a combo box like this:
(define combo (gtk-combo-box-entry-new-text))
(for-each (lambda (i) (append-text combo i)) '("a" "b" "c"))
but I don't know how to read out the current value. In the C/python docs
it seems you can access an 'entry' attribute of the combo, but the
get-entry method isn't defined for the combo. I struggled
with the model associated to the combo but the furthest I got was:
(connect combo 'changed
(lambda (b)
(get-value
(get-model b)
(get-iter-first (get-model b) 0))))
which gives me "a" in all cases. Obviously because of the get-iter-first.
I don't see how to do it. Can anybody please give me a little hint?
Thanks in advance.
Maarten
- how to get value from combo,
Maarten Grachten <=