![]() 108 Now that you know how to code, build, and package an app using Vala, Gtk, Just like when we add a Button or Label, we need to create our Gtk. Here is the print_temperature() function: * gtk_label_set_markup(), you’ll want to escape it with: 182 * g_markup_escape_text() or g_markup_printf_escaped(). I am doing it in C You need to create a label with gtk_label_new() before you can change its contents with gtk_label_set_text() Here's a minimal sample program that puts the current time in a label: C++ Here's a simple example where the label is inside a button: There's a convenience function to create buttons with a mnemonic label already inside: To create a mnemonic for a widget alongside the label, such as a, you have to point the label at the entry with gtk-label-set-mnemonic-widget: gtk.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |