cdialoggtkgtkentry

How can I get text from a dialog?


I need to get text from an entry in a dialog, like a login dialog (get the user and password), I've tryied to use 'gtk_entry_get_text' but I did something wrong or there's something else I could use.


Solution

  • In order to get the text from an entry widget in a dialog, you should use gtk_entry_get_text.

    char* entry_content;
    entry_content = gtk_entry_get_text(GTK_ENTRY(entry_widget));
    

    You should take care of this things: