Chapter 11. Using Tcl Built-in Dialog Windows

In this chapter, we will cover:

  • Displaying a message box
  • Displaying a confirmation dialog
  • Displaying the color picker
  • Displaying the directory dialog
  • Displaying the file selection dialog
  • Selecting a directory and file

Introduction

Thankfully, we are not limited to dialog windows of our own creation. Tk provides a full suite of predefined dialog windows to assist us in the more common tasks of collecting, notifying, and general interactions with the end user. These dialog windows allow us to rapidly create an interface that is both professional in appearance and familiar in functionality with minimum effort. As with all Tk-based windows, the appearance of the native OS is duplicated automatically.

Although ...

Get Tcl/Tk 8.5 Programming Cookbook 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.