Form Properites

  • Thread starter Thread starter pz
  • Start date Start date
P

pz

Hello,
Is there a possibility to write a properties (or method) to class
derived from Form to make a some changes in InitializeComponent() for
ALL child:
for example add MYFUNCTION to retrieve item Name?


this.button1.Location = new System.Drawing.Point(120, 91);
this.button1.Name = MYFUNCTION("button1");
.....
this.ctlTab.Name = MYFUNCTION("MyControlTab");

(something like globalization)

Manually changes are not acceptable by designer.

Thanx for help

P.
 
pz said:
Hello,
Is there a possibility to write a properties (or method) to class
derived from Form to make a some changes in InitializeComponent() for
ALL child:
for example add MYFUNCTION to retrieve item Name?


this.button1.Location = new System.Drawing.Point(120, 91);
this.button1.Name = MYFUNCTION("button1");
....
this.ctlTab.Name = MYFUNCTION("MyControlTab");

(something like globalization)

Manually changes are not acceptable by designer.

Thanx for help

P.

I'm not sure what it is you're trying to do, but if it's like globalization,
couldn't you use similar methods like resource files?

It is also completely possible to edit the InitializeComponent() section
yourself. Depending on the changes you make, the designer might not work
anymore, but then you are left where you would be anyway, that is writing
all the designer code yourself. Not necessarily a bad thing.

HTH,
Eric
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top