8.19. Fun Things to Try
Create a scrollable text widget. Insert a button widget that has text describing the foreground color of the text widget and when you click the button, have it cycle between several different colors, updating the button's -foreground color and text. For a practical application, have several buttons, each associated with a different color in your application. When the user clicks the button, you can change the color to a different value (possibly using the ColorEdit composite widget).
Create a text widget that will display a read-only file. Create two buttons on the window, one to decrease the font within the text widget, the other to increase it.,
Get Learning Perl/Tk now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.