How do I set the width of an Tkinter Entry widget in pixels?

Viewed 25412

I noticed that the width argument for the Tkinter entry widget is in characters, not pixels.

Is it possible to adjust the width in pixels?

3 Answers

You can use "ipadx" and "ipady" while packing the "Entry" widget.

You can also use it with "grid".

import tkinter as tk

root = tk.Tk

e = tk.Entry()
e.pack(ipadx=100, ipady=15)

tk.mainloop()

Related