GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Tue Dec 01, 2015 2:41 pm

All times are UTC

Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Any API to show the fill level in horizontal scale???
PostPosted: Mon Mar 31, 2008 5:34 pm 

Joined: Sat Mar 15, 2008 8:38 am
Posts: 2

I am writing a Media player application using GTK. I am using horizontal scale for volume slider.

I have writtten this code:

GtkWidget* hscale;
hscale = gtk_hscale_new_with_range(0.0, 100, 1.0);
gtk_widget_set_size_request(hscale, 80, -1);
gtk_scale_set_draw_value(GTK_SCALE(hscale), FALSE);
gtk_range_set_inverted(GTK_RANGE(hscale), TRUE);

It would graphically look like:



Now i want to show the region in the slider ass mentioned by arrow to be filled so that when i open the player, the volume slider is filled by default and when i drag it from right-to-left, it looks like i am decreasing the volume.

Can anybody tell me a API to do that??? I have searched that and applied 1-2 techniques, but nothing is working.

Any help in this regard would be great...

Thanks in advance.


 Post subject:
PostPosted: Fri Apr 04, 2008 8:29 pm 
Familiar Face

Joined: Mon Aug 20, 2007 8:52 pm
Posts: 8
Media Player using GStreamer

Download this book example code and extract them. Look code for Chapter 11. You can see very easily how to use " GtkHScale widget " in a real Media Player using GStreamer project.


Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC

Who is online

Users browsing this forum: Google [Bot] and 3 guests

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group