Selecting in Python

Selecting involves choosing a mode, action, or a parameter using the mouse. A mode is a way of doing something. We could be in circle, line, rectangle, or point mode, for example, in which the relevant object would be drawn using the mouse. One selects such a mode by clicking the mouse button while the mouse cursor is positioned within a box in the interface: clicking while the cursor in the circle box puts the program in draw circle mode.

We can also select a parameter. Lines have three thicknesses that can be chosen, and a dashed line can be selected, too. We can choose a color with which to draw things.

We can also select actions. We can select that the program back up to the pre­vious state or advance to a previously deleted one, we can save the current image, and we can load an image.

At this point in the design, there are 12 button type items on the screen 5 text boxes for output of position and color, and a color wheel for color selection. Unmentioned so far is a column of the right of the window for image file names. Images in the directory are listed here so that they can be placed into the canvas with a single click.

Source: Parker James R. (2021), Python: An Introduction to Programming, Mercury Learning and Information; Second edition.

Leave a Reply

Your email address will not be published. Required fields are marked *