/zetcode-wxpython-tuts

Tutorials on wxPython from https://zetcode.com/wxpython/

Primary LanguagePython

Zetcode Tutorials on wxPython

Link to Tutorials

Progress

  • First steps in wxPython
  • Menus and toolbars
  • Layout management
  • wxPython events
  • wxPython dialogs
  • wxPython widgets
  • Advanced widgets
  • Drag and drop
  • Graphics
  • Custom widgets
  • Skeletons
  • The Tetris game

Corrections

wx.ArtProvider.GetBitmap(wx.ART_GO_HOME) => Set the bitmap, the previous defaults don't work anymore. More info here

Apparently this got superseded by wx.ListCtrl which now has an wx.EnableCheckBoxes function. More info in the docs. This is also in the readme for advanced widgets.

Conventions

Functions that draw things are capitalized in wxPython. This means MyFrame(None).InitUI(...) not MyFrame(None.initUI(...).

Common Errors

failed at ... in DoSetSize(): invalid frame

You probably forgot to set the parent to None for the top level frame

wx._core.wxAssertionError: C++ assertion ""m_widget"" failed at ... in DoSetSize(): invalid frame

My Columns/Rows aren't expanding as expected

Did you make sure its AddGrowableRow or AddGrowableCol as you required? These are easy to mix up.

Documentation on Some Odd Bits

wx.Sizer Flags

Flags for wx.TextCtrl