Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

wxPython: What is the difference between a wx.Panel and a wx.Window?

I got the impression that Panel is better. Is that true?

What advantage does one have over the other? What reason is there to use one over the other?

like image 543
Ram Rachum Avatar asked Dec 01 '22 12:12

Ram Rachum


1 Answers

wx.Window is the base class for all widgets (not necessarily all windows - the name is misleading).

wx.Panel is a subclass of wx.Window, which is more tailored towards containing widgets inside it. For example, it by default allows moving between widgets using "tab", and handles a focus event in a way that is more useful with child widgets.

like image 171
Hexagon Avatar answered Dec 05 '22 18:12

Hexagon