Obtaining current value from a GtkHscale

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

 



I've been searching the GTK API trying to figure out what is probably a
simple question.  How do I get the current value from a GtkHscale scale
bar?

Since a GtkAdjustment is used to create the scalebar, I think that I
could then use a gtk_adjustment_get_value().  However, I'm using glade-2
to create the primary interface layout and the code that it generated
for this scalebar is 

  Scalebar = gtk_hscale_new (GTK_ADJUSTMENT (gtk_adjustment_new (1, 0,
10, 0.05, 0.2, 0)));

Since it is using the return value from gtk_adjustment_new directly in
to the gtk_hscale_new, I don't have access to the Adjustment that was
created.  I can't (don't want to) make changes in this file because they
will be lost whenever I ask glade to build the source again.  So, is
there a way to get the adjustment that is associated with a GtkHscale
after the fact?

I'm a GTK newbie for sure, wrote a small Gtk application about a year
ago and now have to make some changes.  The GTK tutorial seems to be out
of date or way behind.  (For example, from the API it seems that
GtkEntries are "oldfashioned" and GtkEditable are what should now be
used but the tutorial seems to describe Entries more.)  I'm having a
really hard time trying to figure out things  and how they work from the
GTK API reference.  Are there any other online and more up to date and
easier understood resources for GTK for newbies to use?

_______________________________________________

gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux