Date: Thu, 26 Aug 2004 20:40:51 +0200 (CEST) Message-Id: <20040826.204051.74729746.oandrieu at nerim.net> To: mike at halcrow.us Cc: lablgtk at kaba.or.jp Subject: Re: Combo entry_completion? From: Olivier Andrieu In-Reply-To: <20040826004336.GB22131 at halcrow.us> References: <20040819152938.GA6894 at halcrow.us> <20040820.145324.41627916.andrieu@ijm.jussieu.fr> <20040826004336.GB22131@halcrow.us> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Michael Halcrow [Wed, 25 Aug 2004]: > > To use completion with a combo box entry, it goes somehow like this: > > > > ,---- > > | let make_combo_box_entry_with_completion packing strings = > > | let (combo, (model, column)) = GEdit.combo_box_entry_text ~strings ~packing () in > > | let entry = combo#entry in > > | let completion = GEdit.entry_completion ~model ~entry () in > > | completion#set_text_column column ; > > | (combo, entry, completion) > > `---- > > That worked wonderfully. But I also need to be able to dynamically > replace the contents of the list. With the old combo box, that's just > a matter of manipulating combo#list. It isn't immediately obvious to > me how to go about doing the same on the combo w/ entry completion. well it's about the same, you modify the model (cf GtkListStore API). For instance to add an element: model#set ~row:model#append ~column data you also have, #insert, #prepend, #remove, etc. -- Olivier