Results 1 to 17 of 17

Thread: [RESOLVED] Panel problem between other panels

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Mar 2009
    Posts
    64

    Resolved [RESOLVED] Panel problem between other panels

    Hello ,

    i have 2 panels , one next to other and one picture , when i have the mouse in front of the picture i hover another panel to show , it has a lil bigger width than the panel 1 and that doesnt allow it to show fully...


    something like this :

  2. #2
    Frenzied Member obi1kenobi's Avatar
    Join Date
    Aug 2007
    Posts
    1,091

    Re: Panel problem between other panels

    Change the z-order of the panels. Move the panel you want shown to the top. Look for the Move to Top button in the designer's layout toolbar.
    Please rate helpful ppl's posts. It's the best 'thank you' you can give

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Mar 2009
    Posts
    64

    Re: Panel problem between other panels

    Hi , well i dont kinda get you , what do you mean with change the z - order ? the problem is that when i run the program and i have my mouse in front of my picture , i have inside the code to hover the black panel on screen but the other half is missing on the right as the screen shows.

  4. #4
    Frenzied Member obi1kenobi's Avatar
    Join Date
    Aug 2007
    Posts
    1,091

    Re: Panel problem between other panels

    The black panel is a panel control which is invisible when the program starts, am I right? If so, then when positioning the panel on the form, you have either drawn another control over it, or you have drawn the panel inside the grey area (another panel, I presume?).

    If the black panel's parent control (the control it's drawn on) is the gray panel, then the black panel cannot appear outside the gray panel. The cure for that would be to make the form its parent control. You would do that by cutting the black panel, clicking on the form, and then pasting it and repositioning it as you wish.

    If the black panel's parent control is the form itself, then the right gray panel is on top of the black panel, obscuring it. You need to select the black panel and click the Move to Top button in the designer's layout toolbar.

    http://en.wikipedia.org/wiki/Z-order
    Please rate helpful ppl's posts. It's the best 'thank you' you can give

  5. #5
    PowerPoster boops boops's Avatar
    Join Date
    Nov 2008
    Location
    Holland/France
    Posts
    3,201

    Re: Panel problem between other panels

    A useful VS tool for sorting out designer problems is the Document Outline (View/Other Windows/Document Outline in VS2008). It gives you all the controls on the form in a tree view. You can see at a glance what Z-order all the controls are in (higher Z is nearer the top of the tree). It's also obvious when one control is the child of another. Finally, you can drag items in the tree view up and down to get everything in the order you want. BB

  6. #6

    Thread Starter
    Lively Member
    Join Date
    Mar 2009
    Posts
    64

    Re: Panel problem between other panels

    no the black panel is visible when i run the program and the other 2 panels have a strict size which i dont want to change... my problem is that the panel that hovers on my mouse(which is the black panel) has bigger width than the other 2 panels and as u see it doesnt show fully and the right side is missing...

  7. #7
    Frenzied Member obi1kenobi's Avatar
    Join Date
    Aug 2007
    Posts
    1,091

    Re: Panel problem between other panels

    Quote Originally Posted by obi1kenobi View Post
    If the black panel's parent control (the control it's drawn on) is the gray panel, then the black panel cannot appear outside the gray panel. The cure for that would be to make the form its parent control. You would do that by cutting the black panel, clicking on the form, and then pasting it and repositioning it as you wish.
    Do this and your problem will be fixed. Note, however, that any Handles statements concerning the black panel will be removed when you cut it and will not be replaced when you paste it back, so you'll have to add them back manually.
    Please rate helpful ppl's posts. It's the best 'thank you' you can give

  8. #8
    PowerPoster boops boops's Avatar
    Join Date
    Nov 2008
    Location
    Holland/France
    Posts
    3,201

    Re: Panel problem between other panels

    That's because the Designer has put the black panel inside the left-hand white panel, instead of on top of it. So use the Document Outline and drag the black panel out from under the left panel and up to the top. BB

    Edit: didn't see Obi's reply. But this way you don't have to change anything else.

  9. #9

    Thread Starter
    Lively Member
    Join Date
    Mar 2009
    Posts
    64

    Re: Panel problem between other panels

    like this ?

    i want the panel to show next to the picturebox so in first row i can use it on top but in the middle ?...

  10. #10
    Frenzied Member obi1kenobi's Avatar
    Join Date
    Aug 2007
    Posts
    1,091

    Re: Panel problem between other panels

    Quote Originally Posted by xVent View Post
    like this ?
    Yeah, you seem to have done it

    Quote Originally Posted by xVent View Post
    i want the panel to show next to the picturebox so in first row i can use it on top but in the middle ?...
    I'm sorry but I don't quite understand what you mean here... Could you please explain it with a bit more details?
    Please rate helpful ppl's posts. It's the best 'thank you' you can give

  11. #11

    Thread Starter
    Lively Member
    Join Date
    Mar 2009
    Posts
    64

    Re: Panel problem between other panels

    lets say i have 3 pics in the left gray panel and i hover the black panel on them ,they should be fine if i have the position of the panel as seen in the picture... now lets say i have 3 other pics on the middle of the left gray panel and i want the panel to hover next to the picture and not that far up ... where should i position it ?

  12. #12
    Frenzied Member obi1kenobi's Avatar
    Join Date
    Aug 2007
    Posts
    1,091

    Re: Panel problem between other panels

    So you want the position of the panel to change according to the pictures you have in the panel? If so, you need to change the Panel's Location property. If that's not what you wanted, I'm afraid that I still don't understand - it's a bit difficult to visualize. Perhaps inserting pictures or placeholders might help...
    Please rate helpful ppl's posts. It's the best 'thank you' you can give

  13. #13

    Thread Starter
    Lively Member
    Join Date
    Mar 2009
    Posts
    64

    Re: Panel problem between other panels

    it works now , but i have another problem , sometimes when i hover the picture i get some strange effects on the panel like the half is not shown and when i move my mouse again its ok .. ill upload screens as soon as possible.

  14. #14

    Thread Starter
    Lively Member
    Join Date
    Mar 2009
    Posts
    64

    Re: Panel problem between other panels

    like this :

  15. #15
    Frenzied Member obi1kenobi's Avatar
    Join Date
    Aug 2007
    Posts
    1,091

    Re: Panel problem between other panels

    Try setting the form's DoubleBuffered property to true. If that doesn't help, post the code that deals with the panel appearing and disappearing.
    Please rate helpful ppl's posts. It's the best 'thank you' you can give

  16. #16

    Thread Starter
    Lively Member
    Join Date
    Mar 2009
    Posts
    64

    Re: Panel problem between other panels

    because i have some other code in it for other tests it seems it creates this effect.

    its fixed now , so thx guys.

  17. #17
    Frenzied Member obi1kenobi's Avatar
    Join Date
    Aug 2007
    Posts
    1,091

    Re: [RESOLVED] Panel problem between other panels

    You're welcome. Glad you fixed it
    Please rate helpful ppl's posts. It's the best 'thank you' you can give

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width