Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

BringToFront method

Posted on 2006-07-09
4
722 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 Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Summary: Persistence is the capability of an application to store the state of objects and recover it when necessary. This article compares the two common types of serialization in aspects of data access, readability, and runtime cost. A ready-to…
We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

840 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