473,725 Members | 2,281 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

creating runtime tabpages with runtime controls C#

rp
Hi,

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

rp
Nov 16 '05 #1
1 3084
Elp

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

How would I create runtime tabpages with runtime
controls(textBo xes,comboBox, checkedListBox) , inserting,delet ing, 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 programmaticall y.

For example, to create a tab page and add it to your tab control tabControl:
TabPage page = new TabPage("My new tab");
tabControl.Cont rols.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.Botto m;
page.Controls.A dd(button);

To remove this button from your tab page:
page.Controls.R emove(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
3594
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 installing the VS.NET 2005 beta the web browser embedded control is now running in the .NET 2.0 beta runtime environment, and crashing. Is it possible to have different IE hosted controls running side by side in different versions of the .NET...
1
4159
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" According to MS Help this means the <"Line"?> class is not registered in the registry.
4
3493
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
4216
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 but when using the Windows Explorer I get a message saying Microsoft Visual C++ Runtime Library....Runtime Error telling me that the application will be terminated. Click the OK button and all windows explorer related programs crash closed. Im...
8
4185
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 example before I carry on, but even this isn't working.
4
1412
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 buttons(10) As Button Const buttonwh As Integer = 30 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
8
2216
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
1100
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
16184
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 CS2\support files\contents\windows\illustrator.exe
0
8752
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9401
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9257
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8099
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6702
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4519
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4784
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3228
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2637
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.