/* examples/panel/completion.c */ #include He_node *princ, *panel, *text; void entree_proc (He_node *hn) { printf ("Nom de fichier lu : \"%s\"\n", HeGetTextValue (hn)); } int main (int argc, char *argv[]) { HeInit (&argc, &argv); princ = HeCreateFrame (); HeSetFrameLabel (princ, "Complétion"); panel = HeCreatePanel (princ); HeCreateMessageP (panel, "Entrez un chemin de fichier :", TRUE); HeSetPanelLayout (panel, HE_LINE_FEED); text = HeCreateText (panel); HeSetTextVisibleLen (text, 50); HeSetTextNotifyProc (text, entree_proc); HeSetTextCompletion (text, TRUE); HeFit(panel); HeFit(princ); return HeMainLoop (princ); }