Re: vscale working the other way



On Tue, 2003-04-01 at 12:49, Ed Lea wrote:
On Tue, Apr 01, 2003 at 12:29:06PM -0500, Owen Taylor wrote:
On Tue, 2003-04-01 at 11:59, Ed Lea wrote:
Is it possible to make a vscale work backwards? That is, have the
maximum value at the top, the lower (0.0) at the bottom. I am assuming
that it has something to do wthi the gtk_adjustment that the vscale
refers to, however if I set the lower and higher values in
gtk_adjustment_new() to be the other way round, wich I assumed would do
the trick, causes the vscale to stick at the highest value - it won't
move from that.

The code I'm using is:

  intensity = GTK_OBJECT(gtk_adjustment_new(10.0, 10.0, 0.0, 0.2, 1.0,
0.0));
    widget = gtk_vscale_new(GTK_ADJUSTMENT(intensity));

void           gtk_range_set_inverted      (GtkRange      *range,
                                            gboolean       setting);


Sorry, I should have said: I'm using GTK 1.2 (not out of choice, but I
have to). That function doesn't seem to exist in 1.2

Well, the fact that we added that function is a pretty good indicator
that you are out of luck. Your best bet would be to turn off value
display for the scale, compute the inverted value, and display
it in a separate label or entry yourself.

Regards,
                                          Owen





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