[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 : http://i54.tinypic.com/210y68i.jpg
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.
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.
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
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
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...
Re: Panel problem between other panels
Quote:
Originally Posted by
obi1kenobi
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.
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.
Re: Panel problem between other panels
like this ? http://i55.tinypic.com/b84h9e.jpg
i want the panel to show next to the picturebox so in first row i can use it on top but in the middle ?...
Re: Panel problem between other panels
Quote:
Originally Posted by
xVent
Yeah, you seem to have done it :)
Quote:
Originally Posted by
xVent
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?
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 ?
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...
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.
Re: Panel problem between other panels
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.
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.
Re: [RESOLVED] Panel problem between other panels
You're welcome. Glad you fixed it :)