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

How to, not display the tab in a TabControl

Well basically i need to have a tab control but not show the actual
tabs
how to? there doesnt seem to be any property to do this either in teh
tab control nor in each tab
Cheers
Nov 26 '07 #1
7 1756
I don't believe there is a way without custom painting the control
(although in WPF it would be quite easy). Honestly, what you have is just a
bunch of panels then, with no way to switch between them.

Which is exactly how I would recommend you do this, place your controls
on a bunch of panels and then make them visible or invisible when needed.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"roundcrisis" <ro*********@gmail.comwrote in message
news:66**********************************@g21g2000 hsh.googlegroups.com...
Well basically i need to have a tab control but not show the actual
tabs
how to? there doesnt seem to be any property to do this either in teh
tab control nor in each tab
Cheers

Nov 26 '07 #2
What are you trying to do? If you just want to show different controls
at different times (but keeping the others in memory), then perhaps
consider having two overlapping Panel controls and simply toggle the
visibilty of each.

Marc
Nov 26 '07 #3
Hi,

I do not think that it can be done, you will have to roll your own control.

--
Ignacio Machin
http://www.laceupsolutions.com
Mobile & warehouse Solutions.
"roundcrisis" <ro*********@gmail.comwrote in message
news:66**********************************@g21g2000 hsh.googlegroups.com...
Well basically i need to have a tab control but not show the actual
tabs
how to? there doesnt seem to be any property to do this either in teh
tab control nor in each tab
Cheers

Nov 26 '07 #4
On Nov 26, 3:40 pm, "Ignacio Machin \( .NET/ C# MVP \)" <machin TA
laceupsolutions.comwrote:
Hi,

I do not think that it can be done, you will have to roll your own control.

--
Ignacio Machinhttp://www.laceupsolutions.com
Mobile & warehouse Solutions."roundcrisis" <roundcri...@gmail.comwrote in message

news:66**********************************@g21g2000 hsh.googlegroups.com...
Well basically i need to have a tab control but not show the actual
tabs
how to? there doesnt seem to be any property to do this either in teh
tab control nor in each tab
Cheers- Hide quoted text -

- Show quoted text -
thanks for ur answers , honestly I find the components for winforms
quite restrictive
is there anything better ?

Cheers
Nov 26 '07 #5
Restrictive in what way? What are you trying to do where you find it
restrictive?

Have you looked at WPF?
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"roundcrisis" <ro*********@gmail.comwrote in message
news:71**********************************@b15g2000 hsa.googlegroups.com...
On Nov 26, 3:40 pm, "Ignacio Machin \( .NET/ C# MVP \)" <machin TA
laceupsolutions.comwrote:
>Hi,

I do not think that it can be done, you will have to roll your own
control.

--
Ignacio Machinhttp://www.laceupsolutions.com
Mobile & warehouse Solutions."roundcrisis" <roundcri...@gmail.comwrote
in message

news:66**********************************@g21g200 0hsh.googlegroups.com...
Well basically i need to have a tab control but not show the actual
tabs
how to? there doesnt seem to be any property to do this either in teh
tab control nor in each tab
Cheers- Hide quoted text -

- Show quoted text -

thanks for ur answers , honestly I find the components for winforms
quite restrictive
is there anything better ?

Cheers

Nov 26 '07 #6
On 2007-11-26 09:14:37 -0800, roundcrisis <ro*********@gmail.comsaid:
thanks for ur answers , honestly I find the components for winforms
quite restrictive
is there anything better ?
As Nicholas says, restrictive in what way?

Without the tabs of the TabControl, you'll have to provide your own UI
for switching "tabs". But it's not difficult.

I just answered a very similar question:
http://groups.google.com/group/micro...aa175913ece042

I

can't guarantee that there's nothing better around than using the .NET
forms API, but it is very flexible. If you're having trouble, it's
more likely that you just haven't learned it well enough than that
there's some fundamental problem.

Yes, when you want to deviate from the standard behavior, you have to
write some extra code. But in my experience it doesn't usually take
much extra code, and that's completely expected in any sort of
framework anyway. Customization is always going to require at least
_some_ extra code; it's not practical for a framework to implement
every possible variation on its behavior.

In your own case, switching between your "tabs" will be as simple as
using the Control.Show() and Control.Hide() methods. How the user will
control depends on your own desire, but even if you want it to be
managed by keyboard shortcuts, that's not difficult. You'll just want
to add an appropriate key handler override to your form (which method
to override will depend on which keys you want to use for controlling
the tabs).

Pete

Nov 26 '07 #7
On Nov 26, 6:41 pm, Peter Duniho <NpOeStPe...@NnOwSlPiAnMk.comwrote:
On 2007-11-26 09:14:37 -0800, roundcrisis <roundcri...@gmail.comsaid:
thanks for ur answers , honestly I find the components for winforms
quite restrictive
is there anything better ?

As Nicholas says, restrictive in what way?

Without the tabs of the TabControl, you'll have to provide your own UI
for switching "tabs". But it's not difficult.

I just answered a very similar question:http://groups.google.com/group/micro...languages.csha...

I

can't guarantee that there's nothing better around than using the .NET
forms API, but it is very flexible. If you're having trouble, it's
more likely that you just haven't learned it well enough than that
there's some fundamental problem.

Yes, when you want to deviate from the standard behavior, you have to
write some extra code. But in my experience it doesn't usually take
much extra code, and that's completely expected in any sort of
framework anyway. Customization is always going to require at least
_some_ extra code; it's not practical for a framework to implement
every possible variation on its behavior.

In your own case, switching between your "tabs" will be as simple as
using the Control.Show() and Control.Hide() methods. How the user will
control depends on your own desire, but even if you want it to be
managed by keyboard shortcuts, that's not difficult. You'll just want
to add an appropriate key handler override to your form (which method
to override will depend on which keys you want to use for controlling
the tabs).

Pete
Thanks for your answers, probably my impresion on it been restrictive
(ok, perhaps not the right word) comes from the
fact that I used to use delphi and the componets logic is far more
friendly and intuitive than this,
I m not saying that It can't be done just saying that it requires more
effort and I cant see the benefit of the added complexity
this comment only applies to the components.
Cheers
Nov 27 '07 #8

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

Similar topics

1
by: Paiam Salavati | last post by:
I want to change the the color of the tabs and the color of TabControl itself in a TabControl. Therefore I wrote the following code in my customized TabControl-class: this.DrawMode =...
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...
1
by: Tom | last post by:
Hi I want to display the DB data in a tabcontrol. There is a textbox insides that tabcontrol <code private void Bind_DBData( string strSql = "select * from table WHERE id > 0 order by id"...
5
by: Paul Tomlinson | last post by:
Tabpages and Imagelists - I want to align the image to the left so I can display some text... All, I have a number of tabpages and on each tab page I currently have an image and some text, now...
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...
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...
2
by: Simon Verona | last post by:
I have a few hundred forms in my application. All are based on a custom base form class. I decided that I wanted to globally change the look and feel of many of the controls in my application -...
2
by: Gav | last post by:
I am writing an application where I will have a TabControl and 3 styles of Tabs to go in it, each containing different controls. The tabs will be added to the tabcontrol when items are clicked on...
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: 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:
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
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...
1
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
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,...
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...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.