From: Mattia B. <mb...@ds...> - 2002-06-09 08:23:34
|
> I've tried everything I can think of so that a Wx::HTML window will > automatically resize to fit the window, but it remains static. I have > the Wx::HTML window on a panel, inside a NoteBook sizer. > > Does anybody know how to set it so it will resize itself? > Maybe it needs wxGROW somewhere, but I can't figure out where that goes > in this context. http://cvs.sourceforge.net/cgi- bin/viewcvs.cgi/wxperl/wxPerl/demo/wxNotebookSizer.pm?rev=HEAD&content- type=text/vnd.viewcvs-markup I just added a sample for notebook sizers ( and guess why I added it now... ) > Here's the code: > > # Create panel for HTML window > my( $panel ) = Wx::Panel->new( $nb, -1 ); > > # Insert new page as first page (0), because the other pages have > already been created > my $htmlpage = $nb->InsertPage(0, $panel, "Browse", 1, 0); > > my $panel_size = $panel->GetBestSize(); > > my ($htmlwin) = HTMLPage->new($panel, $main::ID_MyHTMLWin, > wxDefaultPosition, $panel_size); > ---------------------------- wxNotebookSizer -> follow link for "Programming with wxNBS" each notebook page needs to have a sizer for its size to be taken into account ( yes, this once bite me, too ) HTH Mattia |