473,698 Members | 2,114 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1310

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

Similar topics

1
3637
by: Richard | last post by:
All, In my Windows based .NET C# application I tried to change a form's background color to non-gray. The form backround color change had the desired ripple effect for most controls on the form however it had no effect, and is a problem, for: - a TabControl {not a tabpage - the tabcontrol itself} - the scroll bars of a Datagrid
0
1923
by: Chris Millar | last post by:
I have a user control that i wish to extend to change the date when the user selects the numeric up down button. The code explains itself, hope someone can help. any ideas appreaciated.. Chris. code :
4
5113
by: Greg Oetker | last post by:
Hi All, I'm looking for a good example for writing a User Control that does not expose the properties of the User Control itself (ie. Tab Stop, Password, Colors, etc.). I only want to expose the Properties and Methods I created. Also, I would like to make it invisible at runtime (this.visible = true; works fine). One last thing is how can I make it go to the bar where all other non runtime controls (ie. Timer, Menus, Statusbar, etc.)...
6
3375
by: Steve Booth | last post by:
I have a web form with a button and a placeholder, the button adds a user control to the placeholder (and removes any existing controls). The user control contains a single button. I have done all the usual stuff of recreating the usercontrol in the Page Init event. The 'failure' sequence is as follows: - select web form button to display the user control - select user control button, event fires - select web form button to display...
4
1935
by: Tim::.. | last post by:
Can someone please help.... I'm having major issues with a user control I'm tring to create! I an trying to execute a sub called UploadData() from a user control which I managed to do but for some reason I keep getting the error: Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
3
2231
by: Tim::.. | last post by:
Can someone please help.... I'm having major issues with a user control I'm tring to create! I an trying to execute a sub called UploadData() from a user control which I managed to do but for some reason I keep getting the error: Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
4
1481
by: triveni.chandran | last post by:
I have two ascx files (header.ascx,footer.ascx) on default.aspx file. In header.ascx file User Control hosts a DropDownList containing a list of Colors. if any change event occurs in the dropdown list,it should reflect in the footer.ascx file label. please can any one tell me vb coding. Thanks in Advance.
1
1051
by: Mordachai | last post by:
I'm trying to simply generate the list of enumeration values for a given enumeration class. e.g., for the following: enum struct Colors { red, green, blue }; I would like to have a function: void PrintValuesOf(the enumeration class or instance or whatever works)
3
2793
by: Terry Olsen | last post by:
I'm trying to add a domain user to a local group using the code below: Dim LCL As New DirectoryEntry("WinNT://" + Environment.MachineName + ",computer") Dim DOM As New DirectoryEntry("WinNT://us.ups.com") Dim DOMUSR As DirectoryEntry = DOM.Children.Find("USERID", "user") Dim LCLGRP As DirectoryEntry = LCL.Children.Find("LOCAL_GROUP", "group")
0
8674
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, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look ! Part I. Meaning of...
0
8603
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
8861
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...
0
7723
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 projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6518
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
5860
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
4619
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3045
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
2
2328
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.