Hi NG:

this code works on a desktop

it also works on a Windows ce Maschine BUT their is no text on the button???

Am I doing something wrong or is it a bug?

Regards Michael

public Form1()

{

//

// Erforderlich für die Windows Form-Designerunterstützung

//

InitializeComponent();

for(int i = 0; i < 5 ; i++){

System.Windows.Forms.Button button = new Button();

button.Parent = this;

button.Text = "Test";

button.Location = new System.Drawing.Point(0,i * 40);

button.Size = new System.Drawing.Size(100,40);

}

}

Re: BUG in CF? creating button on runtime , but no text is set??? by Alex

Alex
Tue Sep 30 23:05:29 CDT 2003

Instead of setting button.Parent, try using this.Controls.Add(button)

"Michael Daniels" <spammichzu@spammer.de> wrote in message
news:uWcE2L3hDHA.3616@TK2MSFTNGP11.phx.gbl...
> Hi NG:
>
> this code works on a desktop
>
> it also works on a Windows ce Maschine BUT their is no text on the
button???
>
> Am I doing something wrong or is it a bug?
>
> Regards Michael
>
> public Form1()
>
> {
>
> //
>
> // Erforderlich für die Windows Form-Designerunterstützung
>
> //
>
> InitializeComponent();
>
> for(int i = 0; i < 5 ; i++){
>
> System.Windows.Forms.Button button = new Button();
>
> button.Parent = this;
>
> button.Text = "Test";
>
> button.Location = new System.Drawing.Point(0,i * 40);
>
> button.Size = new System.Drawing.Size(100,40);
>
> }
>
> }
>
>