|
ms
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
How to, not display the tab in a TabControlWell 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 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 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. -- Show quote- Nicholas Paldino [.NET/C# MVP] - mvp@spam.guard.caspershouse.com "roundcrisis" <roundcri***@gmail.com> wrote in message news:66cab519-c6d9-43c9-b1a0-079b4ba496b4@g21g2000hsh.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 Hi,
I do not think that it can be done, you will have to roll your own control. Show quote "roundcrisis" <roundcri***@gmail.com> wrote in message news:66cab519-c6d9-43c9-b1a0-079b4ba496b4@g21g2000hsh.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 On Nov 26, 3:40 pm, "Ignacio Machin \( .NET/ C# MVP \)" <machin TA
laceupsolutions.com> wrote: Show quote > Hi, thanks for ur answers , honestly I find the components for winforms> > 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.com> wrote in message > > news:66cab519-c6d9-43c9-b1a0-079b4ba496b4@g21g2000hsh.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 - quite restrictive is there anything better ? Cheers Restrictive in what way? What are you trying to do where you find it
restrictive? Have you looked at WPF? -- Show quote- Nicholas Paldino [.NET/C# MVP] - mvp@spam.guard.caspershouse.com "roundcrisis" <roundcri***@gmail.com> wrote in message news:71f3fb11-a827-44b8-8f96-3cdd92e0f429@b15g2000hsa.googlegroups.com... > On Nov 26, 3:40 pm, "Ignacio Machin \( .NET/ C# MVP \)" <machin TA > laceupsolutions.com> wrote: >> 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.com> wrote >> in message >> >> news:66cab519-c6d9-43c9-b1a0-079b4ba496b4@g21g2000hsh.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 On 2007-11-26 09:14:37 -0800, roundcrisis <roundcri***@gmail.com> said:
> thanks for ur answers , honestly I find the components for winforms As Nicholas says, restrictive in what way?> quite restrictive > is there anything better ? 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/microsoft.public.dotnet.languages.csharp/browse_thread/thread/c340677bace859f2/b2aa175913ece042 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 On Nov 26, 6:41 pm, Peter Duniho <NpOeStPe***@NnOwSlPiAnMk.com> wrote:
Show quote > On 2007-11-26 09:14:37 -0800, roundcrisis <roundcri***@gmail.com> said: Thanks for your answers, probably my impresion on it been restrictive> > > 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/microsoft.public.dotnet.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 (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 |
|||||||||||||||||||||||