473,320 Members | 1,713 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,320 software developers and data experts.

Creating Runtime Controls in a TabControl


I need to create some runtime controls in a TabControl

I've tried doing the following but no controls appear

txtBox = New TextBo
tabCtrl.TabPages.Item(2).Controls.Add(txtBox) ' 2 being the index of the page I want to add the contro
txtBox.Left = 10
txtBox.Right = 10
txtBox.Visible = Tru
txtBox.Enabled = Tru
txtBox.Show(

Can someone tell me where I'm going wrong

thanks in advanc

Dyla

Jul 21 '05 #1
4 1420
Hi Dylan,

txtBox = New TextBox
TabPage2.Controls.Add(txtBox)
txtBox.Left = 100
txtBox.Right = 100
txtBox.Visible = True
txtBox.Enabled = True


Is more common code.

Cor
Jul 21 '05 #2
Hi Dylan,

txtBox = New TextBox
TabPage2.Controls.Add(txtBox)
txtBox.Left = 100
txtBox.Right = 100
txtBox.Visible = True
txtBox.Enabled = True


Is more common code.

Cor
Jul 21 '05 #3
APG
Dylan wrote:
I need to create some runtime controls in a TabControl.

I've tried doing the following but no controls appear:

txtBox = New TextBox
tabCtrl.TabPages.Item(2).Controls.Add(txtBox) ' 2 being the index of the page I want to add the control
txtBox.Left = 100
txtBox.Right = 100
txtBox.Visible = True
txtBox.Enabled = True
txtBox.Show()

Can someone tell me where I'm going wrong?

thanks in advance

Dylan

The Right property of textbox is read only. Without that, it works as
desired.

HTH,
APG
Jul 21 '05 #4
APG
Dylan wrote:
I need to create some runtime controls in a TabControl.

I've tried doing the following but no controls appear:

txtBox = New TextBox
tabCtrl.TabPages.Item(2).Controls.Add(txtBox) ' 2 being the index of the page I want to add the control
txtBox.Left = 100
txtBox.Right = 100
txtBox.Visible = True
txtBox.Enabled = True
txtBox.Show()

Can someone tell me where I'm going wrong?

thanks in advance

Dylan

The Right property of textbox is read only. Without that, it works as
desired.

HTH,
APG
Jul 21 '05 #5

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

Similar topics

0
by: Dylan | last post by:
I need to create some runtime controls in a TabControl I've tried doing the following but no controls appear txtBox = New TextBo tabCtrl.TabPages.Item(2).Controls.Add(txtBox) ' 2 being the...
5
by: Steve | last post by:
Visual Studio 2003 .Net / C# I have a 2 page Tab Control for users to add a Job in my application. The first page is for them to choose which type of Job they would like. The type of Job...
1
by: rp | last post by:
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
1
by: RA | last post by:
Hi 1) I want to create a TabPage class in design mode - how do I do it? What type of project should I use? Is it going to be a custom control? 2) I have a TabControl that I would like to add to...
4
by: slylos | last post by:
I've got a Windows form that has a TabControl. I add TabPages to this TabControl at Runtime, along with two Textboxes and a button. The problem I'm having is I can't figure out how to reference...
1
by: Luc | last post by:
Hi, I have a TabControl and, at runtime, I need to add some tabpages. The problem is that each tabpage is similar to the others and contains several controls. If I do...
1
by: ben m | last post by:
Hi all - we've recently switched up to 2005, and I'm having trouble getting the hang of some things, among them, creating a control for the project. Currently, we use a combination of controls on a...
8
by: redeagle | last post by:
I'm wondering what the best practice is for creating a WinApp "wizard" that contains 4 or 5 "steps". Options so far are 1) Single WinForm making various controls visible/non visible at the...
5
by: svein.erik.storkas | last post by:
I'm creating an application where the user first selects a number from a combobox. Based on his choice of number, ComboBoxes and buttons are to be created (at runtime of course). Let's say that...
5
by: Paul Hemans | last post by:
Hi, I am using VS2005. I have a form with a tabControl on it. Suddenly I can no longer see any of my controls, on any of the pages, or even the tabControl itself. They still exist because the...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.