473,406 Members | 2,633 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Tkinter Label 'justify' Problem

Hi All,
I am fairly new to Python programming. I am working on a small
Tkinter project and I think I am missing something, maybe you can
help. The two lines below is all I have related to the Label widget:

lblServer = Tkinter.Label(serverFrame, text='Server:', fg='black',
justify='left', relief='groove')

lblServer.place_configure(width=200, bordermode='inside')
No matter what I change the 'justify' to whether it's 'lef', 'right',
or 'center', it always seems to be in the center.

I am also writing the keys from the Label widget to a file because
this has me so baffled. That is below.

Thank in advance for any help or direction you can give me.

Steve P

---------- lblServer keys -----------------
activebackground : SystemButtonFace
activeforeground : SystemButtonText
anchor : center
background : SystemButtonFace
bd : 2
bg : SystemButtonFace
bitmap :
borderwidth : 2
compound : none
cursor :
disabledforeground : SystemDisabledText
fg : black
font : {MS Sans Serif} 8
foreground : black
height : 0
highlightbackground : SystemButtonFace
highlightcolor : SystemWindowFrame
highlightthickness : 0
image :
justify : left
padx : 1
pady : 1
relief : groove
state : normal
takefocus : 0
text : NNTP Server:
textvariable :
underline : -1
width : 0
wraplength : 0
---------- lblServer keys END -------------
Sep 17 '08 #1
1 4873
On Wed, Sep 17, 2008 at 2:18 PM, Dude <st******@gmail.comwrote:
Hi All,
I am fairly new to Python programming. I am working on a small
Tkinter project and I think I am missing something, maybe you can
help. The two lines below is all I have related to the Label widget:

lblServer = Tkinter.Label(serverFrame, text='Server:', fg='black',
justify='left', relief='groove')

lblServer.place_configure(width=200, bordermode='inside')
No matter what I change the 'justify' to whether it's 'lef', 'right',
or 'center', it always seems to be in the center.
The "justify" option comes into play only when you have a multi-line
label, which is not the case. If you want it left/right aligned then
use pack (instead of place, not really recommended but I don't know
what you are doing) and specify the anchor option with an appropriate
value ('e' or 'w') for what you want.
>
I am also writing the keys from the Label widget to a file because
this has me so baffled. That is below.

Thank in advance for any help or direction you can give me.

Steve P

---------- lblServer keys -----------------
activebackground : SystemButtonFace
activeforeground : SystemButtonText
anchor : center
background : SystemButtonFace
bd : 2
bg : SystemButtonFace
bitmap :
borderwidth : 2
compound : none
cursor :
disabledforeground : SystemDisabledText
fg : black
font : {MS Sans Serif} 8
foreground : black
height : 0
highlightbackground : SystemButtonFace
highlightcolor : SystemWindowFrame
highlightthickness : 0
image :
justify : left
padx : 1
pady : 1
relief : groove
state : normal
takefocus : 0
text : NNTP Server:
textvariable :
underline : -1
width : 0
wraplength : 0
---------- lblServer keys END -------------
--
http://mail.python.org/mailman/listinfo/python-list


--
-- Guilherme H. Polo Goncalves
Sep 17 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Josh | last post by:
Caution, newbie approaching... I'm trying to come up with a very simple Tkinter test application that consists of a window with a drop-down menu bar at the top and a grid of colored rectangles...
6
by: max(01)* | last post by:
hi people. when i create a widget, such as a toplevel window, and then i destroy it, how can i test that it has been destroyed? the problem is that even after it has been destroyed, the instance...
5
by: max(01)* | last post by:
hello. the following code: 1 from Tkinter import * 2 3 class MiaApp: 4 def __init__(self, genitore): 5 self.mioGenitore = genitore 6 self.i = IntVar()
5
by: max(01)* | last post by:
hello. i wrote a very simple tkinter demo program that uses menus, buttons, labels, entries, frames and secondary toplevels. it is a python version of a java program made by a colleague. ...
0
by: Stewart Midwinter | last post by:
I have a Tkinter app running on cygwin. It includes a Test menu item that does nothing more than fetch a directory listing and display it in a Toplevel window (I'd use a tkMessageBox showinfo...
5
by: half.italian | last post by:
Hi all, I don't really understand how to properly use threading in my programs, however I have managed to get by so far using them improperly. Once again I have come up to what I think is...
3
by: joshdw4 | last post by:
I hate to do this, but I've thoroughly exhausted google search. Yes, it's that pesky root window and I have tried withdraw to no avail. I'm assuming this is because of the methods I'm using. I...
0
by: Guilherme Polo | last post by:
On Wed, Sep 3, 2008 at 8:57 PM, Kevin McKinley <kem1723@yahoo.comwrote: Come on.. "help on lines 384-403", that is not a good way to look for help. You are supposed to post some minimal code that...
1
by: Francesco Bochicchio | last post by:
Il Mon, 18 Aug 2008 12:15:10 +0100, dudeja.rajat ha scritto: Uhm, I don't think you should use the grid manager to obtain a window like that. The grid manager is for equally distributing...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.