Chapter 8. Creating Windows Forms Applications

WHAT'S IN THIS CHAPTER?

  • Creating a form design without using the Visual Designer

  • Building a Windows Forms application

  • Using events and delegates in IronPython

Most of the applications you've worked with in the book so far rely on a character-mode interface. Of course, character-mode is just fine when you're dealing with utilities or example applications, but most users want a GUI. The idea of typing commands at the command prompt is so foreign to most of today's users that you'd never get them all trained to use your application.

Fortunately, you can create a number of graphical application types using IronPython. Unfortunately, many of the graphical programming tools available to Python developers won't work with IronPython because IronPython lacks support for C-style libraries. This is a situation where you really do need Windows Forms support to provide what the user needs in the way of an application.

The problem for the IronPython developer is that IronPython isn't integrated into Visual Studio. Consequently, you won't have Visual Designer support in a pure IronPython environment. (Chapters 16 and 17 show how to overcome this problem by using either C# or Visual Basic.NET to produce the user interface.) This chapter discusses some ways in which you can produce a great interface without using the Visual Designer.

A graphical interface naturally implies writing code that responds to events (handlers) and providing the code required to produce ...

Get Professional IronPython™ 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.