help-smalltalk
[Top][All Lists]
Advanced

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

Re: [Help-smalltalk] GtkComboBox doesn't understand me...


From: Paolo Bonzini
Subject: Re: [Help-smalltalk] GtkComboBox doesn't understand me...
Date: Sun, 31 May 2009 09:19:02 +0200
User-agent: Thunderbird 2.0.0.21 (Macintosh/20090302)

Joachim Jaeckel wrote:
> Hello Paolo,
> 
> thanks for your answer!
> 
>> I think you need to connect the text of the combobox to column 0 of the
>> model?  (See example-tree.st).
> 
> But isn't that, which I did with:
> "setOop: iterator column: 0 value: 'One'." ?
> 
> Or am I wrong?

The model is a table of information, but you have to connect the model
to the view explicitly.  Here is the relevant code for GtkTreeView, I
think it should be similar for comboboxes:

        col := GtkTreeViewColumn new.
        treeView insertColumn: col position: -1.
        col setTitle: 'Class'.
        col packStart: (rend := GtkCellRendererText new) expand: true.
        col
            addAttribute: rend
            attribute: 'text'
            column: 1.
        treeView setModel: tree.

Paolo




reply via email to

[Prev in Thread] Current Thread [Next in Thread]