Adventures in Python by Craig Richardson
Author:Craig Richardson
Language: eng
Format: epub, pdf
ISBN: 9781118951842
Publisher: Wiley
Published: 2015-01-23T09:59:13+00:00
Below the line that begins with canvas = tk.Canvas add the following line of code to create the text box: hexText = tk.Entry(window)
Find this line of code in your program: window.mainloop()
Above it, add this line of Python code to add the text box to the window using the grid system: hexText.grid(row=3, column=1, columnspan=3)
Save the program and run it using Run⇒Run Module.
You should notice that the window now has an additional text box at the bottom. Try moving the sliders and you will notice that the value in the text box changes. This value will be the same as the colour used for the background of the canvas.
Figure 4-5 shows the program with the added text box.
FIGURE 4-5 The colour picker with the text box
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Embedded Programming with Modern C++ Cookbook by Igor Viarheichyk(4088)
Linux Device Driver Development Cookbook by Rodolfo Giometti(4020)
Implementing Cellular IoT Solutions for Digital Transformation by Dennis McCain(4002)
Embedded Linux Development Using Yocto Project - Third Edition by Otavio Salvador & Daiane Angolini(3866)
TinyML Cookbook by Gian Marco Iodice(3768)
Simplifying 3D Printing with OpenSCAD by Colin Dow(2904)
TinyML Cookbook by Gian Marco Iodice & Ronan Naughton(2659)
Fusion 360 for Makers by Lydia Sloan Cline(2308)
Networking A Beginner's Guide by Bruce Hallberg(2289)
Hands-On Linux for Architects by Denis Salamanca(2132)
Computers For Seniors For Dummies by Nancy C. Muir(2106)
But How Do It Know? by J. Clark Scott(2079)
Raspberry Pi and MQTT Essentials by Dhairya Parikh(2036)
Arduino Project Handbook, Volume 2: 25 Simple Electronics Projects for Beginners by Geddes Mark(1999)
9781803246888-ENHANCING DEEP LEARNING WITH BAYESIAN INFERENCE by Unknown(1969)
Hack and HHVM by Owen Yamauchi(1955)
31 Days Before Your CompTIA A+ Exams (Shanette Luellen's Library) by Benjamin Patrick Conry(1922)
Hands-On Internet of Things with MQTT by Tim Pulver(1828)
MicroPython Projects by Jacob Beningo(1818)