Bonjour,

Je suis nouveau en C et Gtk et j'essaye d'écrire sur un gtk_entry afin de récupérer le texte. J'arrive à afficher le widget mais après je n'arrive pas à écrire...

Voilà le code,

Merci par avance.

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
if(i == pKey->keyval)
        {
            fillsheet(pApp,chain);
            pApp->pEntry = gtk_entry_new();
            /* Limitation du nombre de caracteres */
            gtk_entry_set_max_length(GTK_ENTRY(pApp->pEntry), 4);
            /* Mode mot de passe */
            gtk_entry_set_visibility(GTK_ENTRY(pApp->pEntry), FALSE);
            /* Modification du caractere affiche */
            gtk_entry_set_invisible_char(GTK_ENTRY(pApp->pEntry), '*');
 
            gtk_table_attach(GTK_TABLE(pApp->pTable), pApp->pEntry,1, 2, 3, 4,GTK_EXPAND , GTK_EXPAND,100,0);
 
            gtk_widget_show_all(pApp->pWindow);
 
            g_signal_connect(G_OBJECT(pApp->pEntry), "activate", G_CALLBACK(checkpass),(gpointer) pApp);
 
            //checkpass(pApp);
 
            break;
        }