Hello!
I'm Windows user WxWidgets. (Wx Version: 0.9 wxWidgets 2.8.9)
I have problem with XRC LoadFrame.
I found sample(that i add to attachment ) and try change size of frame.
It looks like XMLResorce ignore size tag in xrc for Frame.
How set size of frame in XRC?
Sorry for my English.
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<resource xmlns="http://www.wxwindows.org/wxxrc" version="2.3.0.1">
<object class="wxFrame" name="MyFrame1">
<style>wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL</style>
<size>800,600</size>
<title></title>
<object class="wxBoxSizer">
<orient>wxVERTICAL</orient>
<object class="sizeritem">
<option>0</option>
<flag>wxALL</flag>
<border>5</border>
<object class="wxTextCtrl" name="m_textCtrl1">
<style>wxTE_MULTILINE|wxTE_READONLY</style>
<size>300,150</size>
<value></value>
<maxlength>0</maxlength>
</object>
</object>
<object class="sizeritem">
<option>1</option>
<flag>wxEXPAND</flag>
<border>5</border>
<object class="wxBoxSizer">
<orient>wxHORIZONTAL</orient>
<object class="spacer">
<option>1</option>
<flag>wxEXPAND</flag>
<border>5</border>
<size>0,0</size>
</object>
<object class="sizeritem">
<option>0</option>
<flag>wxALL</flag>
<border>5</border>
<object class="wxButton" name="m_button1">
<label>Button 1</label>
<default>0</default>
</object>
</object>
<object class="sizeritem">
<option>0</option>
<flag>wxALL</flag>
<border>5</border>
<object class="wxButton" name="m_button2">
<label>Button 2</label>
<default>0</default>
</object>
</object>
</object>
</object>
</object>
</object>
</resource>
package MyApp;
our $VERSION = '1.2.3.4';
use Wx qw(:everything);
use Wx::XRC;
use base 'Wx::App';
sub OnInit
{
my $self = shift;
my $xr = Wx::XmlResource->new();
$xr->InitAllHandlers();
$xr->Load('test.xrc');
my $frame = Wx::Frame->new;
$xr->LoadFrame($frame, undef, 'MyFrame1');
$frame->Show(1);
}
package main;
MyApp->new->MainLoop;