9User Interfaces

9.1 Controls and Event-Handling

9.2 Using Controls

9.3 (Optional) Using Visual C#

9.4 (Optional) A GUI for Insertion Sorting

Graphical user interface components such as buttons and text boxes let the user communicate directly with our program. We first introduce delegates and the various user interface controls, and next show how the C# event model allows TextBox, ComboBox, Button, CheckBox, RadioButton, and ListBox event sources to communicate with event handlers. An optional section uses Visual C# to create a Form. The concluding optional case study uses exploratory programming to develop a GUI for insertion sorting. We defer menus to a later chapter after we have introduced files.

We show the displays from our examples and ...

Get Computing with C# and the .NET Framework, 2nd Edition 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.