Python Forum
Gtk justification doesn't work
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Gtk justification doesn't work
#2
Here is a very small demo:
#!/usr/bin/env python3

import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk

dialog = Gtk.Dialog(title="Dialog", buttons=(Gtk.STOCK_OK, Gtk.ResponseType.OK))
dialog.set_default_size(400, -1)
box = dialog.get_content_area()

label = Gtk.Label("Label 1")
label.set_justify(Gtk.Justification.RIGHT)
box.pack_start(label, True, True, 0)
label = Gtk.Label("Label 2")
label.set_justify(Gtk.Justification.LEFT)
box.pack_start(label, True, False, 0)
label = Gtk.Label("Label 3")
label.set_justify(Gtk.Justification.RIGHT)
box.pack_start(label, False, True, 0)
label = Gtk.Label("Label 4")
label.set_justify(Gtk.Justification.LEFT)
box.pack_start(label, False, False, 0)

dialog.show_all()
response = dialog.run()
dialog.destroy()
Reply


Messages In This Thread
Gtk justification doesn't work - by rebelxt - Nov-05-2016, 02:19 AM
RE: Gtk justification doesn't work - by rebelxt - Nov-05-2016, 11:57 AM
RE: Gtk justification doesn't work - by rebelxt - Nov-05-2016, 01:52 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  [PyQt] graphyview setdata() doesn't work after recieving a mount of data ugly_curry_garlic 3 899 Nov-22-2023, 05:58 PM
Last Post: Axel_Erfurt
  [Tkinter] Scrollbar doesn't work on Canvas in Tkinter DeanAseraf1 3 9,530 Sep-19-2019, 03:26 PM
Last Post: joe_momma
  [Kivy] Installed but doesn't work antonmichel 13 14,060 Jan-30-2018, 10:34 AM
Last Post: antonmichel
  [Tkinter] canvas.create_text doesn't work in a function vmarinelli 2 7,037 Jan-18-2018, 09:31 AM
Last Post: vmarinelli

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020