1

So I have a issue for where I type it will be right at the middle which I want to start it at the beginning of the box.

entry_notfor = Entry(root, textvariable=number_notoffer, width=30, bg="#1f1e1e", fg="#ffffff")
entry_notfor.place(x=5, y=390, height=100)

this is what it looks like now: enter image description here

TeisqI
  • 115
  • 7

1 Answers1

1

There's nothing you can do if you make the entry widget taller than it wants to be. An Entry widget is designed to be only one line tall. If you stretch it to be unnaturally tall, the text will always only appear centered vertically.

If your intent is to support multiline input then you should use a Text widget rather than an Entry.

Bryan Oakley
  • 370,779
  • 53
  • 539
  • 685
  • So is there a possibility I can grab the users input? With textvariable, using text widget? – TeisqI Aug 16 '20 at 19:36
  • @TeisqI `txt.get(1.0,END)` would do the trick, but with more lines there is a different way, do some searches on the internet or Bryan can edit the answer with the `get()` method of `Text` too. More on [this](https://mail.python.org/pipermail/tutor/2005-February/035669.html) – Delrius Euphoria Aug 16 '20 at 19:41
  • So for example I had something called``` number_offer = StringVar()``` would it be and did test_cookie = Text(root, textvariable=number_offer, width=20, height=50) would it work? – TeisqI Aug 16 '20 at 19:42
  • i dont think you need a variable for this – Delrius Euphoria Aug 16 '20 at 19:43
  • So it can grab it without textvariable – TeisqI Aug 16 '20 at 19:44
  • How would I be able to call the .get() method? – TeisqI Aug 16 '20 at 19:45
  • its fine, try and let me know and also look [here](https://mail.python.org/pipermail/tutor/2005-February/035669.html) – Delrius Euphoria Aug 16 '20 at 19:48