471,337 Members | 1,180 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,337 software developers and data experts.

User controls & System colors

Here’s the situation:

I am writing a C# Windows application using VS 2003. I have built a user
control, and it has a Tab Control on it with (currently) 2 tab pages, and the
whole thing sits on a panel (for resizing with a splitter etc). Each of the
tab pages is marked AutoScroll = true.

When I load the application I load a tree-view control (scrollable = false),
to the first tab page, and that page has system scroll bars that encompass
the entire page, and get their color from the system. However, when I click
over to the second tab, which has a data grid on it, the only scroll bars are
on the datagrid, NOT the tab page, and the color seems to be coming from the
control NOT the system. It also does not appear to be possible to turn OFF
the scroll bars on the datagrid. By the way I have created a DataStyle for
the Datagrid so I can manipulate the column width etc.

I have tried changing the “scrollable” properties of the different objects
(tab pages, user control, tab control, panel even), but have not been able to
get the reaction I want. Ideally I would like to have the scrolling on the
control (I think), but at the very least I would like to have the scroll bars
on the datagrid get their colors from the system, so that if a user changes
the Color Scheme on the desktop it is reflected in my app. This is what is
happening on the first page, just NOT on the second page, or for that matter
it doesn’t happen on other controls in other panels on the page either.

I have MacDonald’s book on User Interfaces, and the Sell’s book on Windows
Form Programming, but so far have not been able to find what I need. Can
anyone help, or at least point me to another resource that might be able to
help?

Thanks.

--
MCSD.NET, MCAD, MCT
Feb 22 '06 #1
0 1220

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Richard | last post: by
reply views Thread by Chris Millar | last post: by
4 posts views Thread by Greg Oetker | last post: by
4 posts views Thread by Tim::.. | last post: by
3 posts views Thread by Tim::.. | last post: by
1 post views Thread by Mordachai | last post: by
3 posts views Thread by Terry Olsen | last post: by
reply views Thread by rosydwin | last post: by

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.