On Sat, Dec 10, 2005 at 09:51:56PM +0100, Gennadiy Donchyts wrote:
>    Is there something like Count in the ComboBox, or IList
>    ComboBox.Items?
> 
>    I checked gtk# documentation and there is nothing about how to get
>    number of current text strings in the combo box

You need to check out the underlying TreeModel. Monodoc has fairly good
documentation of that class, including the one admittedly oddly named
IterNChildren () method. Here's a small boo example:

<code>
import Gtk from 'gtk-sharp'
Application.Init ()
w = Window ('test')
c = ComboBox.NewText ()

for v in ('cat', 'dog', 'shoe'):
        c.AppendText (v)

c.Changed += { print "${c.Model.IterNChildren ()}" }
w.Add (c)
w.ShowAll ()
Application.Run ()
</code>

hth,

-pete


-- 
Peter Johanson
<[EMAIL PROTECTED]>
_______________________________________________
Gtk-sharp-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/gtk-sharp-list

Reply via email to