473,386 Members | 1,764 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

creating runtime tabpages with runtime controls C#

rp
Hi,

How would I create runtime tabpages with runtime
controls(textBoxes,comboBox, checkedListBox), inserting,deleting, and
modifing the tabpages whenever I want to in C#? Thanks in advance.

rp
Nov 16 '05 #1
1 3071
Elp

"rp" <rp****@comcast.net> wrote in message
news:OY**************@TK2MSFTNGP09.phx.gbl...
Hi,

How would I create runtime tabpages with runtime
controls(textBoxes,comboBox, checkedListBox), inserting,deleting, and
modifing the tabpages whenever I want to in C#? Thanks in advance.


You do all that in the designer and then have a look at the generated code
to understand how to do it programmatically.

For example, to create a tab page and add it to your tab control tabControl:
TabPage page = new TabPage("My new tab");
tabControl.Controls.Add(page);

To create a button and dock it on the bottom of your tab page:
Button button = new Button();
button.Text = "Test Button";
button.Dock = DockStyle.Bottom;
page.Controls.Add(button);

To remove this button from your tab page:
page.Controls.Remove(button);

Note that to be able to modify your controls anytime during runtime, you
need to keep a reference to them somewhere. You could for example make them
member variables of your class. There are of course also plenty of other
solutions to add, remove, modify and get references to your controls at
runtime. Have a look at the doc of all the controls you need.
Nov 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Mathew | last post by:
Hi How do you specfiy the version of the .net runtime libraries loaded for a ..net controls hosted in Internet Explorer 6? I have a control that's designed to work with .NET 1.1, but after...
1
by: Casper | last post by:
I am issuing the following commands in a form's detail on click event. Private Sub Detail_Click() Dim Nline As Line Set Nline = New Line I get :"ActiveX component can't create object" ...
4
by: Kimmo Laine | last post by:
Hello, (how) can i do the following (in C#)? // . . . class MyForm : Form { // . . . protected Button myButton = null; protected TextBox myTB = null;
1
by: Robert | last post by:
Im using Windows XP Pro, SP2 (error was still with SP1), P4 3.4Ghz, 1Gb Ram, NVidia FX1100 Graphics, Using Programs such as Autodesk Inventor & AutoCAD. I don't have a clue what Microsoft Visual is...
8
by: Jason | last post by:
Hi everyone, Have a small problem which I hope you can help me with. I'm trying to create several link buttons at runtime which run a routine when clicked. I've tried to create a VERY basic...
4
by: Ron | last post by:
I want to create 10 buttons on a form at runtime, the code below is only creating one button labeled 1. Any idea what I am doing wrong? Public Class Form1 Public code(10) As String Public...
8
by: julia_beresford | last post by:
Hi I need to create the following class at runtime: public class MyCollection : CollectionBase { public void Add(MyItem item) { List.Add(item); }
1
by: cmdolcet69 | last post by:
How can I create a dropdown box at runtime? I want my dropdown box to appear when my user enters the program and the it would load the save data from an xml file. How can i do this?
2
by: 770ariel | last post by:
i'd be thankfull if someone can help me with this: i get this message when i try to run adobe illustrator CS2 microsoft visual c++ runtime library runtime error! program: ...rator...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.