GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Fri Apr 18, 2014 11:16 pm

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: How to inserts a widget in the toolbar at the given position
PostPosted: Fri Nov 16, 2007 7:51 am 
Offline
Familiar Face

Joined: Wed Sep 19, 2007 1:30 pm
Posts: 10
Location: Hyderabad, India
hello,

how to inserts a widget in the toolbar at the given position.
because gtk_toolbar_insert_widget is deprecated

i tried with gtk_tool_button_new (GtkWidget *icon_widget, const gchar *label);
instead of icon_widget i used other widget (e.g GtkHScale) it is able to show hscale in its default size ,
but not getting the control of scale , it acts like a button

how i can get control of hscale ?
is it a right way to insert a widget in the toolbar ?

can anybody help me?

Thank you
sphurti


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 16, 2007 9:50 am 
Offline
Familiar Face

Joined: Tue Jan 23, 2007 6:13 pm
Posts: 34
Why do you need hscale? If you need just to scroll a window or some other widget you probably should take a look at "ScrolledWindow" widget.
It is available for easy use in Gazpatcho and Glade.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 16, 2007 7:38 pm 
Offline
Never Seen the Sunlight

Joined: Wed Sep 21, 2005 12:07 am
Posts: 563
Location: Portland, OR USA
A GtkToolButton is a button. It is derived from GtkToolItem. Use GtkToolItem instead.

From the API docs:

Quote:
GtkToolItems are widgets that can appear on a toolbar. To create a toolbar item that contain something else than a button, use gtk_tool_item_new(). Use gtk_container_add() to add a child widget to the tool item.

_________________
Micah Carrick - Forum Administrator
http://www.micahcarrick.com


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 19, 2007 4:45 am 
Offline
Familiar Face

Joined: Wed Sep 19, 2007 1:30 pm
Posts: 10
Location: Hyderabad, India
Thanks Micah Carrick
It is working !!!!!!
:)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


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