wxPanel vs. wxControl for creating controls
Volker Bartheld
dr_versaeg at freenet.de
Thu Oct 18 12:00:36 PDT 2007
Hi Chris!
On Thu, 18 Oct 2007 11:31:16 -0700, Chris Stankevitz wrote:
> I am trying to create a "control" which can be placed inside a sizer.
> This "control" will contain a couple wxSliders and a wxScrollBar.
> My control drives from wxPanel; however, a coworker suggested I derive
> it from wxControl instead. Should I? Why?
IMHO no. Because there are quite some shortcomings with deriving from
wxControl like rendering issues that were mentioned in this thread:
http://groups.google.com/group/comp.soft-sys.wxwindows/browse_frm/thread/acb6dae3c5964564
> PS: A problem arouse when I tried to embed a wxPanel-derived control
> inside another wxPanel-derived control. The wxButtons all appeared atop
> one another prompting the coworker to suggest the whole thing should
> have been wxControl derived.
I experienced more or less the exact opposite. Maybe you got your
inheritance wrong or didn't use sizers to group your controls?
HTH,
Volker
--
mailto: V B A R T H E L D at G M X dot D E
More information about the wx-users
mailing list