473,396 Members | 2,033 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,396 software developers and data experts.

A few questions on TabControl

Max
I have a form in my project, which based on the user selection (probably
from a combo box) has to change its content. I guess the best way to
describe it is if I had a TabControl on that form, then depending on the
index of selected item from the combobox the corresponding tab would be
automatically shown. The problem with that method is that the user would
still have the ability to manually select the tabs, and that would cause
a few problems. I guess my main question would be, is there some way to
disable user’s ability from selecting tabs or even from knowing which
tabs exist? Like have a tabcontrol which shows tabs only during design
time, but once the program is started the tabs would disappear and the
only way of changing them would be through code.

If something like that is not exactly possible, then is there maybe some
other way to be able to design a kind of form which is able to change
its contents? I mean without setting up all the controls on one page and
then writing hundreds of lines of code to determine which are visible
and which are not.

Also if you know some 3rd party controls which may do this, please let
me know. Thanks.
Nov 20 '05 #1
4 1211
Max,

There are two ways to approach this. I have used both.

1. Put each different set of controls on a different form. Then you can
"reparent" the form onto a panel on your main form. The trick to
reparenting a form is to set the following properties of the form.

<code (VB.NET) >
..TopLevel = False
..Dock = DockStyle.Fill
..FormBorderStyle = FormBorderStyle.None
</code>

2. Infragistics has a nice tab control as a part of its UltraWinToolbars
product. One of the styles on this controls is "wizard" where the control
does not display the tabs and you have complete control over which tab
displays.

Like I said, I have written project both ways and there really isn't much
difference.

-Sam Matzen
"Max" <ma*****@yahoo.com> wrote in message
news:Ce********************@comcast.com...
I have a form in my project, which based on the user selection (probably
from a combo box) has to change its content. I guess the best way to
describe it is if I had a TabControl on that form, then depending on the
index of selected item from the combobox the corresponding tab would be
automatically shown. The problem with that method is that the user would
still have the ability to manually select the tabs, and that would cause
a few problems. I guess my main question would be, is there some way to
disable user’s ability from selecting tabs or even from knowing which
tabs exist? Like have a tabcontrol which shows tabs only during design
time, but once the program is started the tabs would disappear and the
only way of changing them would be through code.

If something like that is not exactly possible, then is there maybe some
other way to be able to design a kind of form which is able to change
its contents? I mean without setting up all the controls on one page and
then writing hundreds of lines of code to determine which are visible
and which are not.

Also if you know some 3rd party controls which may do this, please let
me know. Thanks.

Nov 20 '05 #2
Take a look at:
"An Alternative approach to TabPage Navigation"
http://dotnetrix.co.uk/tabcontrols.html

--
Mick Doherty
http://dotnetrix.co.uk
"Max" <ma*****@yahoo.com> wrote in message
news:Ce********************@comcast.com...
I have a form in my project, which based on the user selection (probably
from a combo box) has to change its content. I guess the best way to
describe it is if I had a TabControl on that form, then depending on the
index of selected item from the combobox the corresponding tab would be
automatically shown. The problem with that method is that the user would
still have the ability to manually select the tabs, and that would cause
a few problems. I guess my main question would be, is there some way to
disable user’s ability from selecting tabs or even from knowing which
tabs exist? Like have a tabcontrol which shows tabs only during design
time, but once the program is started the tabs would disappear and the
only way of changing them would be through code.

If something like that is not exactly possible, then is there maybe some
other way to be able to design a kind of form which is able to change
its contents? I mean without setting up all the controls on one page and
then writing hundreds of lines of code to determine which are visible
and which are not.

Also if you know some 3rd party controls which may do this, please let
me know. Thanks.

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.701 / Virus Database: 458 - Release Date: 07/06/2004
Nov 20 '05 #3
I don't know if the XTabControl can do it or not, could try it yourself.

Get it at http://www.springsys.com
-Martin
"Max" <ma*****@yahoo.com> wrote in message
news:Ce********************@comcast.com...
I have a form in my project, which based on the user selection (probably
from a combo box) has to change its content. I guess the best way to
describe it is if I had a TabControl on that form, then depending on the
index of selected item from the combobox the corresponding tab would be
automatically shown. The problem with that method is that the user would
still have the ability to manually select the tabs, and that would cause
a few problems. I guess my main question would be, is there some way to
disable user’s ability from selecting tabs or even from knowing which
tabs exist? Like have a tabcontrol which shows tabs only during design
time, but once the program is started the tabs would disappear and the
only way of changing them would be through code.

If something like that is not exactly possible, then is there maybe some
other way to be able to design a kind of form which is able to change
its contents? I mean without setting up all the controls on one page and
then writing hundreds of lines of code to determine which are visible
and which are not.

Also if you know some 3rd party controls which may do this, please let
me know. Thanks.

Nov 20 '05 #4
http://dotnetrix.co.uk/tabcontrols.html --> An Alternative approach to
TabPage Navigation

--
Mick Doherty
http://dotnetrix.co.uk/nothing.html
"Martin Hill" <Ma****@nospam.com> wrote in message
news:ur**************@tk2msftngp13.phx.gbl...
I don't know if the XTabControl can do it or not, could try it yourself.

Get it at http://www.springsys.com
-Martin
"Max" <ma*****@yahoo.com> wrote in message
news:Ce********************@comcast.com...
I have a form in my project, which based on the user selection (probably
from a combo box) has to change its content. I guess the best way to
describe it is if I had a TabControl on that form, then depending on the
index of selected item from the combobox the corresponding tab would be
automatically shown. The problem with that method is that the user would
still have the ability to manually select the tabs, and that would cause
a few problems. I guess my main question would be, is there some way to
disable user's ability from selecting tabs or even from knowing which
tabs exist? Like have a tabcontrol which shows tabs only during design
time, but once the program is started the tabs would disappear and the
only way of changing them would be through code.

If something like that is not exactly possible, then is there maybe some
other way to be able to design a kind of form which is able to change
its contents? I mean without setting up all the controls on one page and
then writing hundreds of lines of code to determine which are visible
and which are not.

Also if you know some 3rd party controls which may do this, please let
me know. Thanks.


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.719 / Virus Database: 475 - Release Date: 12/07/2004
Nov 20 '05 #5

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

Similar topics

5
by: Tamir Khason | last post by:
How be able to manage more deeply UI of TabControl and TabPage For example - I want to manage border color, change color of TabPage reef, eliminate spaces from both sides of the reef, so I bould...
0
by: Henry | last post by:
Using ideas provided by some of you I was able to figure out how to get the names of the parameters fields of a crystal report specified at run time. The code below just basically puts the...
3
by: mat | last post by:
Hi all, If I have a main form with a TabControl and this method: protected void NewTab() { TabPage newTab; newTab = new TabPage(); newTab.BackColor = ...
2
by: Patrick McGuire | last post by:
I want to place a tabControl with almost identical properties on several forms. I think the best way is to define a UserControl that inherits System.Windows.Forms.TabControl, and place all my...
7
by: Victor S. | last post by:
1. What is System.Windows.Forms.VisualStyles.TextMetricsCharacterSet good for? 2. Are the Indic scripts supported? Are all supported scripts fully supported? (for printing and fine measuring)...
9
by: Michael Turner | last post by:
Hi Guys Having problem with the tab control, I need to set the background color to something different than the standard, I have found code on the web and now can redraw the tabpage buttons so...
5
by: Zadkin | last post by:
Does anyone know, if it's possible to set the orientation of the tabpagebuttons to horizontal instead of vertical when the alignment property of my tabcontrol is set to left or right? Thanks in...
1
by: =?Utf-8?B?QWxleCBLLg==?= | last post by:
Hi all In a Visual Studio 2005 C# project, I have a simplest tabcontrol with two tabpages. When I set tab control's Alignment property to Right, tab texts (captions) disappear. Does anybody...
0
by: bertie78 | last post by:
Hi all, New poster here! I'm having some difficulty updating a tabcontrol cross-threads. The general idea is : the main thread is the owner of the tab control and the form controls. However, due...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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,...
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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...

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.