[Mono-winforms-list] Creating window elements on the fly - can it be done?

PFJ pjohnson1 at uclan.ac.uk
Wed Feb 10 07:06:38 EST 2010


Hi,

I'm trying to do something which I'm not sure if it's possible to do, so
please be patient.

I have a winform with a single window that has nothing in it. The code for
the winform loads an XML file which has three elements - designer,
questions, answers. The questions and answers elements aren't a problem,
they're strings and things like that. The problem is the designer.

The idea is that the window is just a canvas. In the designer I have the
likes of 

<objecttype>RtfTextBox</objecttype>
<xpos>100</xpos>
<ypos>100</ypos>
<xsize>250</xsize>
<ysize>200</ysize>
<writable>false</writable>
<visible>true</visible>
<usemethod>null</usemethod>

This is very simplistic.

The question is, can I take this data and just create a new window object
from it. Currently <objecttype> is a string, if I change it to object, can I
then just say object foo = new object(); and (for example here) creates an
RtfTextBox?

TTFN

Paul
-- 
View this message in context: http://old.nabble.com/Creating-window-elements-on-the-fly---can-it-be-done--tp27530188p27530188.html
Sent from the Mono - WinForms mailing list archive at Nabble.com.



More information about the Mono-winforms-list mailing list