In the previous example, we used the box layout. Now let's learn another layout, grid. In fact, these la s are similar. If you understand the previous example, it is not difficult to use grid. Program running effect: Package mainimport
ObjectiveAs the RubyGnome2 library becomes more sophisticated and ruby1.9 performance improves, writing GUI programs with Ruby gradually turns from my hobby to an important part of my job.Writing a program in Ruby is really fun, and it allows you to
Using the RubyGnome2 library for the basic method of Ruby GUI programming under GTK,
PrefaceAs the RubyGnome2 library becomes more and more perfect and ruby1.9 performance is improved, writing GUI programs in Ruby has gradually changed from my
Linux from the beginning to go GTK +-3.0 (4), gtk-3.0
In practical applications, there are often many controls. Similarly, GTK provides many layout schemes, such as Box, Fixed, Table, and Grid.
Next, try Grid layout.
We create example4.c with the
Gtk basic learning Summary (1), gtk basic learning Summary
Example of the first GTK program:
# Include
# Include
Int main (int argc, char * argv [])
{
Gtk_init (NULL, NULL); // initialize GTK
GtkWindow * window = gtk_window_new
C Language Learning (2)-GTK layout, C Language Learning-gtk LayoutFirst, understand the Definition Format of the function in gtk:
Remember the following formats.
Declare variable: GtkAbc * abc = gtk_abc_new () Declare control;Value
First understand the definition format of functions in GTK:Keep in mind the following several formats to see the following code
Declaring variables: gtkabc*abc=gtk_abc_new () Declaration control;Assignment: Gtk_abc_set_label
When composing components, you can also discharge components in a table-like manner. In GTK, you can use gtktable, you can use the gtk_table_new () function to create:
Gtkwidget * Table = gtk_table_new (3, 3, true );
The preceding program segment
Example of the first GTK program:#include #include int main (int argc, char *argv[]){Gtk_init (Null,null); Initialize GTKGtkwindow *window =gtk_window_new (gtk_window_toplevel); Create a new Windows windowGtk_window_set_title (window, "Windows title"
Glade
Simple use instructions + examplesGlade has been developed in GNOME. It is an extension of GTK/gdk, a traditional interface design tool. It can meet the basic needs of visual development of Graphical User Interfaces Based on GTK + libraries.
1.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.