16 AnswersNew Answer
My line is Text=Tkinter.Text(window, height=5, width=30, font=("Courrier",25)) Text.pack() And there is just the scrollbar in the window And if I write Text.pack(fill=X) There is a text area but with just one column So I think the issue is with my arguments width and height but I don't understand Can anyone help me please?
7/10/2020 1:01:06 PMLeo Drouin
16 AnswersNew Answer
Yes it's working and very easier, thanks !
Do you have any other widgets in the window?
Yes I have labels and buttons
alright, copy and paste the whole thing in the playground and link it here. dont sound too bad
Have you learned about Frames yet?
Nice, i would add a couple frames to the main window. then add widgets to the frames instead of directly on the main window. Easier to manage and space out, then you can safely work within each frame
I understand that and i'll try, but I would like to understand why it's not working like that, if you saw what is wrong
okay, what exactly were you trying to do with the scrollbar and textbox i didnt get it?
The goal is the user writes a message in the text box, and valid with a button. After that an algorithm change the string wrote and print it in a second textbox
And sorry if I do mistakes in English, I'm french
No worries man. And i was just wondering what the point of the scrollbar is. I would personally start with taking that out. Then i would lay each label, button, and text box, and after all that I'd worry about commands. (you can set the text variable of most text boxes to a tk.StringVar() then call on them whenever) Make some functions you can use .insert() and .get() to put and retreive values in text boxes. THEN connect the functions to the buttons
And i have honestly never seen lines 15 & 16 before. i know the command keyword but I'm lost with those attributes
Oh sorry, the scrollbar is just to see easily what is in the box of the text is long, it's not really useful but I wanted to try to use it. I tried without the scrollbar and effectively it's working, so I'll do without that for now and I'll try to add them after. I don't know StringVar(), I will study it and try that. Thanks a lot
OH! you shoulda said somethin! from tkinter import scrolledtext put that line right at the top, and make one and pack it like you would a text box bro. This is exactly what you want textbox = scrolledtext.ScrolledText(w, width=15)
Sololearn Inc.535 Mission Street, Suite 1591
Send us a message