[CM] A question about GUI rpogramming for SND

Tim Orford tim@orford.org
Thu, 26 May 2005 11:04:18 +0200


On Wed, May 25, 2005 at 11:59:06AM -0700, cristopher pierson ewing wrote:
> [...] is there any way that I can modify the default values for a slider, 
> say, when the window containing it is opened?

if you dont already have it, get a pointer to the GtkAdjustment for
the slider:

	GtkAdjustment* adj = gtk_range_get_adjustment(GTK_RANGE(my_slider));

the adjustment struct has these properties:
	lower
	page-increment
	page-size
	step-increment
	upper
	value

so you can do, eg:
	adj->upper = 50.0;

see: http://developer.gnome.org/doc/API/2.0/gtk/GtkAdjustment.html


hope that helps.

cheers
-- 
Tim Orford