Microsoft 开发人员网络 > 论坛主页 > Visual Basic IDE > Stacking panels VB 08 Express
提出问题提出问题
 

已答复Stacking panels VB 08 Express

  • 2009年10月30日 17:53joefager 用户奖牌用户奖牌用户奖牌用户奖牌用户奖牌
     
    I am trying to stack panels on top of each other, but they keep becoming children of the one I put them on top of. I am stacking three panels. I want to show each based on certain criteria. The showing and hiding works if they are not directly on top of each other. However, I would like to have them on top of each other. They are all exactly the same size and same position.

    If I stack them and then go to the document explorer, I can see that they created a heiarchy.

    Panel1
         control
       Panel2
              control
           Panel3
                  control

    If I drag panel2 and place it under the form it moves the position of the form in the designer, and won't allow them to stack.

    Is there a work around for this?

    Thank you in advance
    • 已编辑joefager 2009年10月30日 17:55misspelling
    •  

答案

  • 2009年10月30日 18:22joefager 用户奖牌用户奖牌用户奖牌用户奖牌用户奖牌
     已答复
    I was just playing some more and figured out a way around it, maybe there are others, but this is one.

    Just simply create them in individual areas of the designer, and then set all of the position properties to the same position manually in properties, and they sit on top of each other nicely without becoming children. Now it works wonderfully.

    It must be the drag and drop "feature" in the designer that defaults to making them children.

    I will take any other hints that anyonehad though.

    Thanks again,

    Joe

全部回复

  • 2009年10月30日 18:22joefager 用户奖牌用户奖牌用户奖牌用户奖牌用户奖牌
     已答复
    I was just playing some more and figured out a way around it, maybe there are others, but this is one.

    Just simply create them in individual areas of the designer, and then set all of the position properties to the same position manually in properties, and they sit on top of each other nicely without becoming children. Now it works wonderfully.

    It must be the drag and drop "feature" in the designer that defaults to making them children.

    I will take any other hints that anyonehad though.

    Thanks again,

    Joe