Date: Wed, 25 Aug 2004 19:43:36 -0500 From: Michael Halcrow To: Olivier Andrieu Cc: lablgtk at kaba.or.jp Subject: Re: Combo entry_completion? Message-ID: <20040826004336.GB22131 at halcrow.us> Reply-To: Michael Halcrow References: <20040819152938.GA6894 at halcrow.us> <20040820.145324.41627916.andrieu at ijm.jussieu.fr> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="DBIVS5p969aUjpLe" Content-Disposition: inline In-Reply-To: <20040820.145324.41627916.andrieu at ijm.jussieu.fr> Sender: Michael Halcrow --DBIVS5p969aUjpLe Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Aug 20, 2004 at 02:53:24PM +0200, Olivier Andrieu wrote: > Michael Halcrow [Thu, 19 Aug 2004]: > > I am just learning Objective Caml, so if you feel inclined to > > critique my ocaml coding style, please do so. > >=20 > > As the user types into the entry widget of the combo widget, the first > > element in the combo list for which the text typed so far matches is > > auto-completed and highlighted, so that the next character typed > > replaces the auto-completed remainder and re-does the auto completion. >=20 > If you get a runtime error (Failure "unsupported in GTK+ < ...") > this means that lablGTK was not compiled against 2.4 but against a > previous version. If lablGTK was compiled with 2.4 but your program > is linked with a previous version, you will get a linker error. Ah, yes. The Debian Testing package is linked against 2.2. I should have checked that first... > To use completion with a combo box entry, it goes somehow like this: >=20 > ,---- > | let make_combo_box_entry_with_completion packing strings =3D > | let (combo, (model, column)) =3D GEdit.combo_box_entry_text ~strings = ~packing () in > | let entry =3D combo#entry in > | let completion =3D 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. Thanks, Mike --DBIVS5p969aUjpLe Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQFBLTI4LTz92j62YB0RAuB3AJoDjXnnPKplVTzfjSuf9J851rjfPACfQZ0d ru7sdo7OMCAYYVadQ5mukLY= =kyIj -----END PGP SIGNATURE----- --DBIVS5p969aUjpLe--