GTK+ Forums Forum Index GTK+ Forums
Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Any API to show the fill level in horizontal scale???

 
Post new topic   Reply to topic    GTK+ Forums Forum Index -> GTK+ Programming
Author Message
8125835



Joined: 15 Mar 2008
Posts: 2

PostPosted: Mon Mar 31, 2008 5:34 pm    Post subject: Any API to show the fill level in horizontal scale??? Reply with quote

Hi,

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.

cheers..
Jamie
Back to top
subaren
Familiar Face


Joined: 20 Aug 2007
Posts: 8

PostPosted: Fri Apr 04, 2008 8:29 pm    Post subject: Reply with quote

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.

http://media.wiley.com/product_ancillary/30/04717761/DOWNLOAD/776130%20FINAL%20code.zip

Subair
Back to top
Display posts from previous:   
Post new topic   Reply to topic    GTK+ Forums Forum Index -> GTK+ Programming All times are GMT
Page 1 of 1

 


Powered by phpBB © 2001, 2005 phpBB Group
CodeBB 1.0 Beta 2
Protected by Anti-Spam ACP