gtkCompletion entry changed vs focus

"Jacques Le Normand" <[email protected]>
Newsgroups gmane.comp.lang.ocaml.lib.gtk
Message-ID <[email protected]>
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 ()

_______________________________________________
Lablgtk mailing list
[email protected]
http://yquem.inria.fr/cgi-bin/mailman/listinfo/lablgtk
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.