PC Review


Reply
Thread Tools Rate Thread

BUG in CF? creating button on runtime , but no text is set???

 
 
Michael Daniels
Guest
Posts: n/a
 
      30th Sep 2003
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);

}

}


 
Reply With Quote
 
 
 
 
Alex Feinman [MVP]
Guest
Posts: n/a
 
      1st Oct 2003
Instead of setting button.Parent, try using this.Controls.Add(button)

"Michael Daniels" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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);
>
> }
>
> }
>
>



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
at runtime creating of itemtemplates with buttons, text, links, .... in datalist Pugi! Microsoft VB .NET 0 17th Oct 2006 01:01 PM
creating button for "past unformatted text" =?Utf-8?B?VFNC?= Microsoft Word Document Management 3 6th Mar 2005 03:41 AM
Creating a button that takes a text input and passes it to a query =?Utf-8?B?UmljaGFyZCBIb3JuZQ==?= Microsoft Access Forms 1 30th Sep 2004 02:55 PM
creating runtime tabpages with runtime controls C# Elp Microsoft C# .NET 1 16th Jul 2004 04:38 PM
Change grid button text at runtime Charlie Dison Microsoft ASP .NET 3 20th Apr 2004 06:45 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:45 PM.