Re: Need your help when I writing my own gtk widgets



yeajchao wrote:
Hello all
     First of all,i apologize for my terriblly poor English!
     I am going to write a widget for my application
     In my application,there need a virtual instrument,some more like a
watch,but, in the bottom,there must have a digital display of its value
     In fact,what is I want is some more like the dial widget in the gtk
tutorial,but ,the dial widget in the gtk tutorial has no digital display on the
bottom.

All you have to do is this:

/* Create the integer data model */
GtkAdjustment  *adjustment = gtk_adjustment_new (...);

/* Create the "dial" view for the model */
GtkWidget      *dial       = gtk_dial_new (adjustment);

/* Create the "spin button" view for the model */
GtkSpinButton  *spin       = gtk_spin_button_new (adjustment ...);

Add them into a container... since they share the same adjustment;
the values will always be correct (no need to create fancy
derivatives for this simple case ;-p ).

Cheers,
                      -Tristan




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]