locked
How to bring hiddel label to top of Tab control RRS feed

  • Question

  • I have somehow managed to bury a label under several layers of controls (tab control with picture box). I can't "select" the label in the Designer GUI since it is hidden by the tab/picture box. I can see the definition of the label with the object browser, but can't determine how to "raise" the label to a higher level in the GUI without deleting and re-creating the label. Is there a way to change the visual priority by modifying the code?
    • Moved by CoolDadTx Friday, September 21, 2018 1:51 PM Winforms related
    Friday, December 11, 2009 7:18 PM

Answers

  • Hi,

    Select the tab/picturebox, right click and select Send To Back
    • Proposed as answer by Tamer Oz Friday, December 11, 2009 7:38 PM
    • Marked as answer by liurong luo Monday, December 14, 2009 6:02 AM
    Friday, December 11, 2009 7:29 PM
  • To change order in designer:
    On the Layout toolbar (View->Toolbars->Layout) there is a button with an orange square with two black squares behind it (in VS2008). This is the Bring to Front button.

    To change in code:
    To dynamically bring the label to the front during runtime use
    label1.BringToFront();
    • Proposed as answer by Tamer Oz Friday, December 11, 2009 7:38 PM
    • Marked as answer by liurong luo Monday, December 14, 2009 6:02 AM
    Friday, December 11, 2009 7:32 PM

All replies

  • Hi,

    Select the tab/picturebox, right click and select Send To Back
    • Proposed as answer by Tamer Oz Friday, December 11, 2009 7:38 PM
    • Marked as answer by liurong luo Monday, December 14, 2009 6:02 AM
    Friday, December 11, 2009 7:29 PM
  • To change order in designer:
    On the Layout toolbar (View->Toolbars->Layout) there is a button with an orange square with two black squares behind it (in VS2008). This is the Bring to Front button.

    To change in code:
    To dynamically bring the label to the front during runtime use
    label1.BringToFront();
    • Proposed as answer by Tamer Oz Friday, December 11, 2009 7:38 PM
    • Marked as answer by liurong luo Monday, December 14, 2009 6:02 AM
    Friday, December 11, 2009 7:32 PM
  • Tamer,

    THanks. I actually tried this first and it didn't work. Tried it again and it did. It seems that changing the order in which the control is "Added" to the tabPage helped to correctly reshuffle the visibility of the label control. Hmmmm.

    Thanks
    Friday, December 11, 2009 7:37 PM
  • Binglep,

    Thanks, but the problem with the layout button is that I must first "select" the control that I want to "bring to front". Problem is, it's hidden under layers of picture box inside a tabPage. What I want to do is somehow select it visually, then bring it to the front.

    Thanks for the help.

    Mike
    Friday, December 11, 2009 7:39 PM
  • You da man! Thank You.
    Friday, September 21, 2018 5:30 AM