Solved

BringToFront method

Posted on 2006-07-09
4
719 Views
Last Modified: 2012-05-05
When a control's BringToFront method is called, "the control is moved to the front of the z-order. If the control is a child of another control, the child control is moved to the front of the z-order. BringToFront does not make a control a top-level control, and it does not raise the Paint event." (msdn)

How can a control be made a top-level control? (C#)

0
Comment
Question by:campinas
  • 2
  • 2
4 Comments
 
LVL 48

Accepted Solution

by:
AlexFM earned 500 total points
ID: 17067332
Top-level control definition:
The top-level control is defined as the parent control that is not parented by another Windows Forms control. Typically, this is the outermost Form that the control is contained in. For example, if the control is contained on an MDI child Form, then the top-level control is the Multiple Document Interface (MDI) parent Form.

Obviously, it is impossible to make any child control top-level. BrintToFront is enough. Maybe you need to invlalidate parent form to redraw controls in new Z-order.
0
 

Author Comment

by:campinas
ID: 17067410
I have an expandable pane as a child of another control. Initialy the pane is not expanded (only the title bar is visible). When expanded, it is longer than available space in parent control. It cannot expand beyond the limits of the parent control. It actually does expand fully, but the only visible part is what's inside parent control. It looks like what i wanted is not possible... Or is it?
0
 
LVL 48

Expert Comment

by:AlexFM
ID: 17067417
In this case you need to resize parent control or make scrolling. Top-level is not right way.
0
 

Author Comment

by:campinas
ID: 17067476
Thank you!
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Extention Methods in C# 3.0 by Ivo Stoykov C# 3.0 offers extension methods. They allow extending existing classes without changing the class's source code or relying on inheritance. These are static methods invoked as instance method. This…
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now