From: mjb Date: 2005-08-17T03:11:14+09:00 Subject: Re: need ComboBoxEntry example daz wrote: > mjb wrote: > > >>I'm having problems getting the list to show in the popup. >> >>I've spent considerable time trying to track down an example >>at the RAA, but have been unsuccessful. A ComboBox example >>should work just as well for what I need. >> >>If you have an example of either of the above, or link to >>same, I'd sure appreciate it. >> >>Thank you. > > > > Not an example, but the documentation looks pretty good. > > http://ruby-gnome2.sourceforge.jp/hiki.cgi?Gtk%3A%3AComboBoxEntry > > > daz God, I wish. I've spent days with those docs, with no joy. The comboboxentry displays. I can put default text in the entry box. The popup drops down, but it has no text. I'm not sure if I need CellRenderer or a TreeView, or what? Here's what I've got, though it probably has a "kitchen sink" look about it as I'm trying everything at this point: def set_account_list # set the comboentrybox "child", the entrybox text area, to... @account_comboentry_box.child.set_text("hi") @account_comboentry_box.set_text_column(0) # a ListStore is a type of model (of the data) # _this_ model has 1 column of type String @account_list_store_model = ListStore.new(String) # create a row in the model, if number is higher than the current number of rows, # data is appended to the list @new_row_iter = @account_list_store_model.insert(80) # new_row_iter.set_value(1, 'Apple') @account_list_store_model.set_value(@new_row_iter, 0, 'Apple') # view on the model @account_comboentry_box_model_view = TreeView.new(model = @account_list_store_model) # guessing here # @account_comboentry_box.set_view(@account_comboentry_box_model_view) end Still looking for some example code. Thanks