473,788 Members | 2,882 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1236
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
..FormBorderSty le = FormBorderStyle .None
</code>

2. Infragistics has a nice tab control as a part of its UltraWinToolbar s
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******** ************@co mcast.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******** ************@co mcast.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******** ************@co mcast.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******** ******@tk2msftn gp13.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******** ************@co mcast.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
18511
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 custom control that inherit all information from TabPage, but how to access those properties, not supported by standart interface??? Thank you
0
2074
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 data into a comboBox. One thing I noticed, however, is that this method shows me both the parameters used by the main report and parameters used by the sub-report(s).
3
3283
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 = System.Drawing.SystemColors.Window; newTab.Size = new System.Drawing.Size(498, 400);
2
2371
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 controls on it. The problem is that I don't know how to bring up the graphical design interface for the TabControl. I suppose I COULD just design it as a UserControl and place a TabControl on it, but that seems a bit... inelegant (I'm going to...
7
1832
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) Is the printing done by GDI++ without using Unicribe? 3. Is the Text.Encoder/Decoder provided by the OS or by the Framework?
9
3458
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 the are set to the right color, I can obviously change the tabpage colour but I am left with a grey top edge(Where there are no buttons) when the background of the form is changed any ideas on what I can do? Mike.
5
3352
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 advance Zadkin
1
3459
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 know how to fix this? I tried this on two computers, at work and at home, both with Windows XP with latest service packs, and Framework 2.0 and 3.0 with latest SP.
0
1420
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 to the vast amount of data to populate listviews within the tabs, I have created a worker thread (an implementation of a BackgroundWorker) to form the data and populate a tabcontrol 'offline', so that it doesn't interfer with (i.e freeze) the UI. ...
0
9656
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9498
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
10175
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...
1
10112
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9969
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7518
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
6750
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5399
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...
1
4070
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

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.