Re: Container for VisualStyles



Hide the tabs by altering the TabControls DisplayRectangle

http://www.dotnetrix.co.uk/tabcontrols.html --> Add a HideTabs property to
turn on/off the Tabs

Other than that, if you're using VS2005, and it sounds like you are, you
should be able to use the VisualStyleRenderer class to paint the appropriate
appearance in a Panel.
http://msdn2.microsoft.com/en-us/library/system.windows.forms.visualstyles.visualstylerenderer.aspx

--
Mick Doherty
http://dotnetrix.co.uk/nothing.html


"Dale" <dale0973@xxxxxxxxxxxxx> wrote in message
news:FA32C592-499E-4DD3-B2B8-A013076FD0D4@xxxxxxxxxxxxxxxx
I thought your idea was a great one but then, when I tried it, I found out
that you cannot add controls to a TabControl. Apparently, the only conrol
that can be added to a TabControl is a TabPage.

My situation is this: I have two views of my data - simple and advanced.
In simple mode, all of the data fits on one form. In advanced, it takes 4
tabs to view the data. When the user selects simple view, it goes against
Microsoft's usability guidelines for the TabControl to use the TabControl
with only one tab. But I still need the user experience to be the same
as
the advanced view but just no tabs.


--
Dale Preston
MCAD C#
MCSE, MCDBA


"Linda Liu [MSFT]" wrote:

Hi Dale,

When we apply Windows XP Visual Styles to an application, all the
controls
in the application will take a Windows XP look.

However, each control may have a different appearance for Windows XP
Visual
Styles. For example, the TabControl control's background has a light
color
but the Panel control's background has a gray color. In addition, if the
Appearance property of the TabControl is set to Buttons or FlatButtons,
its
background color will turn to gray color.

You have mentioned that you want a non-tabbed container that match the
appearance of a TabControl in your application. Why not use a TabControl
and removing all the tabpages within it?

Hope this helps.
If my suggestion is not appropriate to your scenario, please feel free to
let me know.



Sincerely,
Linda Liu
Microsoft Online Community Support

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent
issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each
follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================

This posting is provided "AS IS" with no warranties, and confers no
rights.




.