:-) Thanks Mark. I know that, but what I am not sure is...
If I use another style in the constructor, which is not set by default, are the default styles still used if they are not explicitly used? If no, then I understand why you need to use wxTAB_TRAVERSAL in the panel constructor. If the default styles are used anyway, then I don't understand why you also need to use wxTAB_TRAVERSAL explicitly. From: "Mark Dootson" <mark.doot...@znix.com> > Hi, > > Yes, the default style for a window is the value used if you do not > provide your own value in the constructor. > > Regards > > Mark > > On 07/06/2011 07:29, Octavian Rasnita wrote: >> OK, but does this mean that if we use some styles for a certain control, >> we should also specify explicitly the default styles because otherwise >> they won't be used as a default? >> >> --Octavian >> >> ----- Original Message ----- From: "Mark Dootson" <mark.doot...@znix.com> >> To: "Octavian Rasnita" <orasn...@gmail.com> >> Cc: <wxperl-users@perl.org> >> Sent: Monday, June 06, 2011 7:04 PM >> Subject: Re: What good is a Wx::Panel? >> >> >>> Hi, >>> >>> wxTAB_TRAVERSAL is the default style setting for Wx::Panel. I only >>> need to be explicit about it as I'm setting other style flags in the >>> constructor. >>> >>> It is possible to have a Wx::Panel get the focus, and if you don't >>> have the wxTAB_TRAVERSAL set, navigation may not work as expected. >>> (The panel will receive your key events rather than the child controls). >>> >>> Unless you are setting some flags explicitly yourself in the >>> constructor, Wx::Panel will have the syle wxTAB_TRAVERSAL set by default. >>> >>> Rgds >>> >>> Mark >>> >>> >>> On 06/06/2011 16:59, Octavian Rasnita wrote: >>>> Hi Mark, >>>> >>>> Why is wxTAB_TRAVERSAL needed in a panel? >>>> >>>> Tabbing from a field to the previous/next by using the shift+tab/tab >>>> keys were possible in non-dialog windows when using a panel. >>>> >>>> Should the wxTAB_TRAVERSAL style be used for beeing able to do this, >>>> and the previous way was just a helpful bug? >>>> >>>> Or wxTAB_TRAVERSAL should be used for another efect? >>>> >>>> Thanks. >>>> >>>> Octavian >>>> >>>> ----- Original Message ----- >>>> From: "Mark Dootson"<mark.doot...@znix.com> >>>> To:<wxperl-users@perl.org> >>>> Sent: Monday, June 06, 2011 5:50 PM >>>> Subject: Re: What good is a Wx::Panel? >>>> >>>> >>>>> >>>>> >>>>> On 06/06/2011 15:43, Shawn H Corey wrote: >>>>>> On 11-06-06 10:25 AM, Mark Dootson wrote: >>>>>>> My tip would be to always use a Wx::Panel within the Wx::Frame. If >>>>>>> you >>>>>>> don't, you will get unexpected and annoying differences in background >>>>>>> drawing between different platforms. >>>>>> >>>>>> OK, it the anything I _should_ do with the panel? >>>>> >>>>> My standard frame creations look something like: >>>>> >>>>> >>>>> my $frame = Wx::Frame->new(undef, -1, 'Frame Title'); >>>>> my $mainpanel = Wx::Panel->new($frame, -1, [-1,-1], [-1,-1], >>>>> wxTAB_TRAVERSAL|wxBORDER_NONE); >>>>> >>>>> ... >>>>> my $childcontrol = Wx::SomeControl->new($mainpanel, ...... >>>>> >>>>> >>>>> my $framesizer = Wx::BoxSizer->new(wxVERTICAL); >>>>> $framesizer->Add($mainpanel, 1, wxEXPAND|wxALL, 0); >>>>> >>>>> my $mainsizer = Wx::BoxSizer->new(wxVERTICAL); >>>>> $mainsizer->Add($childcontrol, ........ >>>>> >>>>> $mainpanel->SetSizer($mainsizer); >>>>> $frame->SetSizer( $framesizer ); >>>>> >>>>>> >>>>>> I'm trying to write a simple todo app (like the world needs another >>>>>> one) >>>>>> because it should be simple enough to help me learn WxPerl but complex >>>>>> enough so I learn something useful. >>>>>> >>>>>> I think I put my endeavours on the wiki. :) >>>>> >>>>> Excellent idea. >>>>> >>>>> >>>>> >>> >> >