Delivered-To: lablgtk at yquem.inria.fr DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type; bh=RyV5rq9ypfSnWKzNedrtV2yhM4OT6kJXwcUJa9B5mz8=; b=HCvnn8BPX3J8/8AD6MYhVvyGOJ4+LhOw9+WOM524D6hdFq4xEEtChYeIurcDE+ytcb Skrg/qTGxAe5h/BcGwyqPm+BIQnsx1g5nnbkMw1YzeQvorwQTpRwxsTxJw3BedJzlwMr 8tT7wsf+zMXHITYrNF5p+LrZ4u9a7vUkvql88= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=leQgMmLNsgIL1ApV2cluPfnO6s1tdlXGR3d1AVWzR/ntpOdabqj40ym7bZZfOGgOjM Fy9JqyoPQn86cLiXbsPZtVXHfM/G6v4x1ihkjlIfGcHhBLifblQQW4M14t1kN5StGR79 srr5lC9aCU09lMySszrEmoGSujFuy8wAW+UgI= Message-ID: Date: Sat, 4 Oct 2008 18:15:33 -0400 From: "Jacques Le Normand" To: lablgtk at yquem.inria.fr MIME-Version: 1.0 Subject: [Lablgtk] gtkCompletion entry changed vs focus Mime-version: 1.0 Content-Type: multipart/mixed; boundary="===============0657517840==" Content-Length: 3194 --===============0657517840== Content-Type: multipart/alternative; boundary="----=_Part_19043_1471948.1223158533359" ------=_Part_19043_1471948.1223158533359 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Dear lablgtk@yquem, thanks for all the help so far! The current behaviour of a completion is to start completing when the entry is changed. How can I change this so that it also starts completing when the entry gets focused? To see what I mean, the following code generates a simple text entry (which starts with the focus). However, there's no completion available (until you change the entry): open GTree open Gobject.Data let cols = new GTree.column_list let col_string = cols#add string let create_model () = let data = ["fooo"] in let store = GTree.list_store cols in let fill str = let iter = store#append () in store#set ~row:iter ~column:col_string str; in List.iter fill data; store let _ = let source_window = GWindow.window () in let entry = GEdit.entry ~packing:source_window#add () in let model = create_model () in let completion = GEdit.entry_completion ~model ~entry () in completion#set_text_column col_string; entry#set_text "foo"; source_window#show (); GMain.Main.main () ------=_Part_19043_1471948.1223158533359 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline
Dear lablgtk@yquem,
thanks for all the help so far! The current behaviour of a completion is to start completing when the entry is changed. How can I change this so that it also starts completing when the entry gets focused?
To see what I mean, the following code generates a simple text entry (which starts with the focus). However, there's no completion available (until you change the entry):



open GTree
open Gobject.Data

let cols = new GTree.column_list
let col_string = cols#add string

let create_model () =
  let data = ["fooo"]
  in
  let store = GTree.list_store cols in
  let fill str =
    let iter = store#append () in
    store#set ~row:iter ~column:col_string str;
  in
  List.iter fill data;
  store



let _ =
  let source_window = GWindow.window () in
  let entry = GEdit.entry ~packing:source_window#add () in
  let model = create_model () in
  let completion = GEdit.entry_completion ~model ~entry () in
    completion#set_text_column col_string;
    entry#set_text "foo";
    source_window#show ();
    GMain.Main.main ()


------=_Part_19043_1471948.1223158533359-- --===============0657517840== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Lablgtk mailing list Lablgtk@yquem.inria.fr http://yquem.inria.fr/cgi-bin/mailman/listinfo/lablgtk --===============0657517840==--