Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to left justify in entry with TK

Status
Not open for further replies.

subasn

Programmer
May 7, 2003
11
0
0
US
Hi All,

Could any one please let me know, how the text can be left justified in entry with TK.

Regards,
Subas N.
 
You can justify an entry with the -justify option:
Code:
  entry .e
  .e insert end "right"
  after 1000 { .e configure -justify right }
The text widget has also a -justify option.
But canvas text justification relies on the -anchor option.

From the Tk manual:
Justify
When there are multiple lines of text displayed in a widget, this option determines how the lines line up with each other. Must be one of left, center, or right. Left means that the lines' left edges all line up, center means that the lines' centers are aligned, and right means that the lines' right edges line up.

HTH

ulis
 
Hi Ulis,

That was excellent. Great job!!

Subas N.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top