On 06/06/2011 16:21, Shawn H Corey wrote:
On 11-06-06 10:50 AM, Mark Dootson wrote:
my $frame = Wx::Frame->new(undef, -1, 'Frame Title');
my $mainpanel = Wx::Panel->new($frame, -1, [-1,-1], [-1,-1],
wxTAB_TRAVERSAL|wxBORDER_NONE);

OK, what does wxTAB_TRAVERSAL do? All I found was, "Use this to enable
tab traversal for non-dialog windows." What every that means.

In this case you want to use Wx::Panel as a simple container. You do not want the panel itself to act like an individual control grabbing certain key events etc. By default, Wx::Panel has the style wxTAB_TRAVERSAL. However, we also want to set the style wxBORDER_NONE so we pass the combined flags in the constructor.


Does it mean that you can use the TAB key to tab to the next control? If
so, why wouldn't you want it on dialog windows too?

You do want this behaviour in a Wx::Dialog, but Wx::Dialog has it by default.

H.T.H.

Mark

Reply via email to