GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Thu Sep 01, 2016 3:37 am

All times are UTC

Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Gtk3.0 Gtkbuttons and junctions sides
PostPosted: Wed Nov 27, 2013 12:40 am 
Familiar Face

Joined: Wed Jan 30, 2013 8:28 pm
Posts: 20
I'm trying to align many GtkButton with junction sides but the result is not what I want...some help please

my code: it is a python code for Gtk3.0 (3.6) I'm on ubuntu 13.04

import gi.repository
from gi.repository import Gtk

def dest(widget):

win = Gtk.Window(Gtk.WindowType.TOPLEVEL)
hbox = Gtk.Box()
bt0 = Gtk.Button.new_with_label("Zero")
bt1 = Gtk.Button.new_with_label("One")
bt2 = Gtk.Button.new_with_label("Two")
win.connect("destroy", dest)
hbox.pack_start(bt0, False, False, 0)
hbox.pack_start(bt1, False, False, 0)
hbox.pack_start(bt2, False, False, 0)

 Post subject: Re: Gtk3.0 Gtkbuttons and junctions sides
PostPosted: Wed Nov 27, 2013 8:16 am 
Never Seen the Sunlight

Joined: Mon Apr 28, 2008 5:52 am
Posts: 1048
Location: UK

gtk_style_context_set_junction_sides() is a hint :- from the documentation
Sets the sides where rendered elements (mostly through gtk_render_frame()) will visually connect with other visual elements.

This is merely a hint that may or may not be honored by theming engines.

Container widgets are expected to set junction hints as appropriate for their children, so it should not normally be necessary to call this function manually.

You would normally use the container to provide alignment for buttons. Since you have NOT stated what you your code to do it is hard to say what is needed.


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], Google Adsense [Bot], Yahoo [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