From: Vadim Zeitlin on
On Sun, 23 Mar 2008 17:30:33 -0400 Martin Cote <cote.martin(a)gmail.com> wrote:

MC> Okay, I'm posting a fully working code sample here (sorry if it's
MC> pretty long). Every time you press the a-key, it adds a new child in
MC> the scrolled view.

This doesn't work for me as I can't give focus to the window handling the
keys. But I've added a menu which calls Add() and this works just fine
in the svn trunk but indeed doesn't work in 2.8 branch (this is under wxGTK
but I think the behaviour should be the same under all platforms). However
just adding SetMinSize() call to Add(), like this:

sizer->Add( item , 0 , wxEXPAND | wxALL , 5 )->SetMinSize(100, 20) ;

(and removing unnecessary and deprecated in trunk SetVirtualSizeHints()
call and replacing Refresh() with Layout()) makes it work as expected AFAICS.

Regards,
VZ

--
TT-Solutions: wxWidgets consultancy and technical support
http://www.tt-solutions.com/

_______________________________________________
wx-users mailing list
wx-users(a)lists.wxwidgets.org
http://lists.wxwidgets.org/mailman/listinfo/wx-users

From: "Martin Cote" on
On Sun, Mar 23, 2008 at 8:00 PM, Vadim Zeitlin <vadim(a)wxwidgets.org> wrote:
> This doesn't work for me as I can't give focus to the window handling the
> keys. But I've added a menu which calls Add() and this works just fine
> in the svn trunk but indeed doesn't work in 2.8 branch (this is under wxGTK
> but I think the behaviour should be the same under all platforms). However
> just adding SetMinSize() call to Add(), like this:
>
> sizer->Add( item , 0 , wxEXPAND | wxALL , 5 )->SetMinSize(100, 20) ;
>
> (and removing unnecessary and deprecated in trunk SetVirtualSizeHints()
> call and replacing Refresh() with Layout()) makes it work as expected AFAICS.

Yes, it did fix my problem. Thanks a lot, that was really helpful!

I've noticed that the SetMinSize() function of wxSizerItem isn't
documented, is there any valid reason for this?

Thanks again,
Martin Cote
_______________________________________________
wx-users mailing list
wx-users(a)lists.wxwidgets.org
http://lists.wxwidgets.org/mailman/listinfo/wx-users