in Education by
I'm trying to take the text from a ttk label and assign it to a variable, but I don't actually know if it is possible to do this. Does anyone know if it is possible and what the syntax is? Or any alternatives? I'm pretty new to python in general and extremely new to tkinter. Can I assign the '0' to a variable in any way? zero = ttk.Button(root, text='0').grid(column=1, row=4) JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
Change your code to: zero = ttk.Button(root, text='0') zero.grid(column=1, row=4) And to get the value, do: var = zero['text']

Related questions

0 votes
    I'm trying to take the text from a ttk label and assign it to a variable, but I don't actually ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 13, 2022 in Education by JackTerrance
0 votes
    I wrote the following code to quickly grab and display information from Wikipedia. It works great unless the ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 13, 2022 in Education by JackTerrance
0 votes
    Is it possible to assign the field type dynamically - Django Form? field_type = 'CharField' field = forms. ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 16, 2022 in Education by JackTerrance
0 votes
    Is it possible to assign the field type dynamically - Django Form? field_type = 'CharField' field = forms. ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 16, 2022 in Education by JackTerrance
0 votes
    I have a Label with defined width and height, and I want text added to it to be clipped if it ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 10, 2022 in Education by JackTerrance
0 votes
    Tell the user to enter your name then read in and assign to a variable a string typed in by the user Select the correct answer from above options...
asked Dec 5, 2021 in Education by JackTerrance
0 votes
0 votes
    Tell the user to enter your name then read in and assign to a variable a string typed in by the user Select the correct answer from above options...
asked Nov 26, 2021 in Education by JackTerrance
0 votes
    I want to assign a value to a TensorFlow variable in Python and I am using this: import tensorflow as tf import ... do to correct this? Select the correct answer from above options...
asked Jan 24, 2022 in Education by JackTerrance
0 votes
    How can we take input text from user in HTML page? (a) input tag (b) inoutBufferedReader tag (c) meta ... & Servlet of Java Select the correct answer from above options...
asked Feb 22, 2022 in Education by JackTerrance
0 votes
    How can we take input text from user in HTML page? (a) input tag (b) inoutBufferedReader tag (c) ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 24, 2021 in Education by JackTerrance
0 votes
    I make a website on php and want to read some information from text file. the reason is if, i ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jul 8, 2022 in Education by JackTerrance
...