herbert breunung write:
if in your XRC is something like:
<object class="wxFrame" name="ConFrame">
<style>wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL</style>
<size>500,131</size>
then there should be no problem, at least i have none :)
But i have problem. :)
size could't change.
x:318
y:194
Maybe my code is not good.
#test.pl
package MyApp;
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');
print "x:".$frame->GetSize()->GetWidth()."\n";
print "y:".$frame->GetSize()->GetHeight()."\n";
$frame->Show(1);
}
package main;
MyApp->new->MainLoop;
#test.xrc
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<object class="wxFrame" name="MyFrame1">
<style>wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL</style>
<size>1000,500</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>
</object>
</resource>