Re: wx.NET project questions
Wilhelm Patrick <[email protected]>
| Newsgroups | gmane.comp.lib.wxwindows.wxnet |
|---|---|
| Message-ID | <BCB494E8B7BF2D40B56D1164C67BC2A8015520F1@kher443a.ww004.siemens.net> |
> > My company is mulling over the idea of using wx.NET to:
> > - Allow our VB.NET apps to display XRC-format dialogs, and
> > - Create a situation where we can write any event-handling code in
> VB.NET.
>
> I'm not sure about the status of the XMLResource classes (they were
> contributed.) But not a lot of work should be involved in providing full
> XRC support.
my company uses wx.NET for a new project and we also use the XMLResource
class. We didn't have any problems to use it for creating dialogs out of xrc
files.
I also wrote the class wrapper for wxXmlResource in wx.NET. The use of
wx.XmlResource differs a little from that of wxXmlResource: I removed the
Get() Method which returns the global resources object. So instead of the
C++ code for wxWindows:
wxXmlResource::Get()->Load("rc/resource.xrc");
the C# code for wx.NET is:
xmlResource = new XmlResource("file.xrc", XmlResourceFlags.XRC_USE_LOCALE);
To load a dialog you have to write:
dlg = xmlResource.LoadDialog(this, "dlg1");
Instead of:
wxXmlResource::Get()->LoadDialog(&dlg, this, "dlg1");
If you have any question about wx.XmlResource don't hesitate to ask me.
Mit freundlichem Gruß / kind regards
SIEMENS AG
Patrick Wilhelm
A&D SE DT RD
Siemensallee 84
D-76181 Karlsruhe, Germany
Email: [email protected]
<mailto:[email protected]>
Tel.: +49 (721) 595 3075
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf