On 24/02/2008, M2U Germany <[EMAIL PROTECTED]> wrote: > On Thursday, February 14, 2008 6:27 PM Robert May wrote: > > I'd be interested in the solution to this! > > > > With the code below I see the toolbar jumping from 1 to 3 rows, > > despite the fact that > > the buttons only appear on 2 rows, and except for when there is only > > one row, the number > > of rows is always one too big. > > > > Nevertheless I reconsidered your example code, Rob. I finally found the > problem causing the wrong dimensions and row counts: we had set the state > constant for the seperator to "TBSTATE_ENABLED" but in fact this doesn't > make much sense because a "TBSTYLE_SEP" button can't be disabled, right? So > I just replaced "TBSTATE_ENABLED" with "0" and all strange behaviour > disappeared. This is probably not a really neat solution and I think there > might be a constant specified for this purpose. "TBSTATE_INDETERMINATE" is a > good candidate, isn't it? It works, too.
Interesting. That change doesn't fix the problem for me. can you post the exact code you are using so I can confirm that I'm understanding what you say exactly. > > Of course I'm not as nearly into Win32::GUI programming > internals as you and probably most other members of this list are... so I > can only guess that using "TBSTATE_ENABLED" on a separator button causes the > toolbar sizing routines to *think* of it as a normal button with comparable > dimension needs and therefore to wrap this (imaginary and obviously not > displayed) space into the next line. As far as I am aware a 'button' of type TB_SEP should completely ignore the state, and it shouldn't make any difference what state you set. I can't see any difference myself. > Whatever the exact reason may be, the solution shown above seems to work. > Main conclusion: no bug to be eliminated... hooray! I don't think this is a bug in Win32::GUI - my gut feeling is that it is the behaviour of the underlying Win32 toolbar control, but I'd be interested in seeing a working solution. Cheers, Rob. ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Perl-Win32-GUI-Users mailing list Perl-Win32-GUI-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users http://perl-win32-gui.sourceforge.net/