473,405 Members | 2,261 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,405 software developers and data experts.

how to make a control gets the backColor of a control below without be its child?

10
I have a userControl-'Board' which contains tow controls, let's call them: 'a' and 'b'.
'a' is located above 'b', but it's NOT its child!!!
'a' is 'Board''s child!.
I want 'a' to be transparent. so I wrote:

Expand|Select|Wrap|Line Numbers
  1.     SetStyle(ControlStyles.SupportsTransparentBackColor, true);
  2.      this.BackColor = Color.Transparent;
and it is transparent, it got the backColor of 'Board'- its parent, but that not good for me!
I want it to get the backColor of 'b', which is below. so, I made 'a' as 'b''s child and that worked fine!, but slowed all the program.
my question is: does anyone know how to make 'a' gets the backColor of 'b' without be its child?
Feb 14 '11 #1
0 923

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Stingray Lien | last post by:
Dear all: How can I depend on field.value to control field.backcolor? which event I should use? I appreciate for your help!!
0
by: Carlitos | last post by:
Hi there, I apologize if it is not the right forum to post this question, but it has to do with C#, HTML and javascript altogether. I programmed a windows form custom control in C# which...
4
by: Pattabi | last post by:
Hi guys!!!!!!!!! Can anyone help me out in this. I have .ascx file with one textbox control in it. I am using it in my .aspx file. What happens is i am giving the id of textbox control in ascx as...
4
by: DotNetJunkies User | last post by:
I have created a User Control (a Pareto Chart) using C#. It works great in .Net Windows Apps, but I also need to use it in a Web Application (to view in IE). Everything I read on this seems to be...
5
by: serge calderara | last post by:
Dear all, I am new in asp.net and prepare myself for exam I still have dificulties to understand the difference between server control and HTML control. Okey things whcih are clear are the fact...
9
by: McGeeky | last post by:
Is there a way to get a user control to remember its state across pages? I have a standard page layout I use with a header and footer as user controls. Each page uses the same layout by means of...
0
by: wei | last post by:
Hello All I want to add RadioBox control or DropDownList control to my login page, so the user can choose which database they want to use, but after I added RadioBox control, It shows me the name"...
2
by: ketaki | last post by:
Hello, I am new to C# and I am facing a problem. I have two user controls.First control has an image which is loaded. And the second control is supposed to be placed on the first control. But when...
2
by: =?Utf-8?B?TWlrZSBDb2xsaW5z?= | last post by:
I have a web app that when I click a menu, I load a control. On one of these controls, I have a button that when clicked, I need to unload the control to unload itself and load a different control...
4
by: =?Utf-8?B?UmljaEI=?= | last post by:
I am trying to create a project using the ASP.NET AJAX accordion control. I would like to dynamically add panes to the control with a form template added when the pane is added. I have tried...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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,...
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
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...
0
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,...

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.