I finally got the tabbing to work. Just in case anybody searches for this in
the future, I have attached the working script.

As Jez suggested (and as I later read on MSDN), the recommended way to do
this is with child windows, rather than child groupboxes. I was on the right
track with the WS_EX_CONTROLPARENT option, but it must be added to the child
window rather than the top-level window. Also, as it is an extended windows
style, it must be added with -pushexstyle or -addexstyle rather than
-pushstyle or -addstyle, as in my previous example (oops!)

There is still no visual indication when disabling the window, but in
hindsight, that's the expected behaviour anyway when disabling a window. It
should be possible to disable the controls in cascade, as for the resize.

Glenn

-----Original Message-----
From: Glenn W Munroe [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, 17 January, 2006 18:22
To: 'Jeremy White'; 'perl-win32-gui-users@lists.sourceforge.net'
Subject: RE: [perl-win32-gui-users] Hierarchical controls


I reworked my example using a child window instead of a group (as an
attachment to preserve formatting). I got exactly the same symptoms (no
tabbing to the child controls and no visual indication of a disabled child
control). I thought I had it when I discovered this:

"WS_EX_CONTROLPARENT   Allows the user to navigate among the child windows
of the window by using the TAB key."

But that didn't work :-(

Anybody else have any ideas? Could it be simply a question of getting the
right combination of -group and -tabstop options? I can't help feeling
there's something deeper going wrong.

Glenn

-----Original Message-----
From: Jeremy White [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, 17 January, 2006 12:07
To: [EMAIL PROTECTED]; perl-win32-gui-users@lists.sourceforge.net
Subject: RE: [perl-win32-gui-users] Hierarchical controls

I use:

  $mainContainer = new Win32::GUI::Window(
        -name => 'Container',
        -width  => 800,
        -height => 500,
        -pos => [0, 310],
        -parent => $mainwin,
        -popstyle    => Win32::GUI::WS_CAPTION | Win32::GUI::WS_SIZEBOX,
        -pushstyle   => Win32::GUI::WS_CHILD | Win32::GUI::WS_CLIPCHILDREN,
        -class => $WC,
        -onResize => \&ContainerResize,
  );

If you add a class of:

  $WC = new Win32::GUI::Class(
    -name => "flicker",
    -style => 0,
  );

Then you'll get flicker free resizing when the child window is resized. Not 
sure about tabbing...

Cheers,

jez.

Attachment: HierarchicalWindow.pl
Description: Binary data

Reply via email to