1
2
3
4
5
6
7
8
9
<object class="wxBoxSizer">
<orient>wxVERTICAL</orient>
<object class="sizeritem">
<option>0</option>
<flag>wxALL</flag>
<border>5</border>
<object class="wxGrid" name="grid_customers" />
</object>
</object>
my $frame = $xr->LoadFrame(undef, 'MyFrame1');
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<?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="GridTest">
<style>wxCLOSE_BOX|wxDEFAULT_FRAME_STYLE|wxMAXIMIZE_BOX|wxMINIMIZE_BOX|wxRESIZE_BORDER|wxTAB_TRAVERSAL</style>
<size>550,413</size>
<title>Gridtest</title>
<centered>1</centered>
<aui_managed>0</aui_managed>
<object class="wxMenuBar" name="m_menubar">
<label>menubar</label>
<object class="wxMenu" name="m_lager">
<label>Lager</label>
<object class="wxMenuItem" name="m_test_quit">
<label>Beenden</label>
<help>Aus is!</help>
</object>
</object>
<object class="wxMenu" name="m_help">
<label>?</label>
<object class="wxMenuItem" name="m_help_about">
<label>Über...</label>
<help></help>
</object>
</object>
</object>
<object class="wxToolBar" name="tb_toolbar">
<style>wxTB_HORIZONTAL</style>
<bitmapsize></bitmapsize>
<margins></margins>
<packing>1</packing>
<separation>5</separation>
<object class="tool" name="tb_btn_login">
<label>Login</label>
<tooltip></tooltip>
<longhelp>Login</longhelp>
<bitmap>P:\Coding\Perl\res\red.bmp</bitmap>
<toggle>1</toggle>
</object>
</object>
<object class="wxStatusBar" name="sb_statusbar">
<style>wxST_SIZEGRIP</style>
<fields>2</fields>
</object>
<object class="wxNotebook" name="nb_notebook">
<style>wxNB_TOP</style>
<object class="notebookpage">
<label>Kunden</label>
<selected>0</selected>
<object class="wxScrolledWindow" name="nb_customers">
<style>wxHSCROLL|wxVSCROLL</style>
<scrollrate>5,5</scrollrate>
<object class="wxBoxSizer">
<orient>wxVERTICAL</orient>
<object class="sizeritem">
<option>0</option>
<flag>wxALL</flag>
<border>5</border>
<object class="wxGrid" name="grid_customers" />
</object>
</object>
</object>
</object>
</object>
</object>
</resource>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
#!/usr/bin/perl -w use strict; package GRID; use Wx qw/ :everything/; use base qw(Wx::App); use Wx::Grid; use Wx::XRC; sub OnInit { my $app = shift; Wx::InitAllImageHandlers(); my $xrc = Wx::XmlResource->new(); $xrc->InitAllHandlers(); $xrc->Load('GridTest.xrc'); my $frame = $xrc->LoadFrame(undef, 'GridTest'); $frame->Show(1); $app->SetTopWindow($frame); 1; } package main; GRID->new->MainLoop;