O'Reilly logo

WxPython Application Development Cookbook by Cody Precord

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Displaying your data model

The DataViewCtrl control has several different ways to display the data that is provided by its data model object. The view and the model objects both influence each other; the view contains settings for the columns of data that are shown, and it sets what type of data they should display. The model is responsible for providing data to the view in the appropriate format when the view requests it. The model also has some control over how the data is displayed by way of providing DataViewItemAttr objects to control the styling of text. In this recipe, we will explore the use of DataViewCtrl a little further by looking at some of its custom column types and how to access data from its event handlers.

Getting ready

In this ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required