![]() (which should be a child of the dialogs action_area). Numeric response, and the content of the element is the id of widget GtkInfoBar supports a custom element, which can contain show an error message gtk_label_set_text ( GTK_LABEL ( message_label ), "An error occurred!" ) gtk_info_bar_set_message_type ( bar, GTK_MESSAGE_ERROR ) gtk_widget_show ( bar ) GtkInfoBar as GtkBuildable ![]() ![]() GtkWidget * message_label GtkWidget * widget GtkWidget * grid GtkInfoBar * bar // set up info bar widget = gtk_info_bar_new () bar = GTK_INFO_BAR ( widget ) grid = gtk_grid_new () message_label = gtk_label_new ( "" ) gtk_info_bar_add_child ( bar, message_label ) gtk_info_bar_add_button ( bar, _ ( "_OK" ), GTK_RESPONSE_OK ) g_signal_connect ( bar, "response", G_CALLBACK ( gtk_widget_hide ), NULL ) gtk_grid_attach ( GTK_GRID ( grid ), widget, 0, 2, 1, 1 ) //.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |