Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Visual Studio.NET / General / May 2006

Tip: Looking for answers? Try searching our database.

Help me to correct this code

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Hebert - 29 May 2006 18:57 GMT
The idea is to create textbox controls with diferents names

This part of the code is wrong

TextBox "txt" + mes + "_" + cod_uni_neg = new TextBox();

Help me to correct it please...

public TextBox CrearControl(string mes,string cod_uni_neg)

{

TextBox "txt" + mes + "_" + cod_uni_neg = new TextBox();

textBox1.Wrap = true;

textBox1.ReadOnly = false;

textBox1.Enabled = true;

textBox1.Visible = true;

textBox1.Text = "YEAH";

textBox1.Width=29;

textBox1.Height =12;

textBox1.BackColor = Color.Red;

return "txt" + mes + "_" + cod_uni_neg ;

}

Thanks a lot
Norman Yuan - 29 May 2006 19:54 GMT
public TextBox CrearControl(string mes,string cod_uni_neg)
{
   TextBox txt=new TextBox();
   txt.Name="txt" + mes + "_" + cod_uni_neg;
   //Set other TextBox properties
   ....
   return txt
}

Of course you will add this newly created TextBox into Form's Controls
collection or other control container (which will be added to Form's
Controls connection eventually).

> The idea is to create textbox controls with diferents names
>
[quoted text clipped - 31 lines]
>
> Thanks a lot

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.