Trouble with panels that overlap Topic is solved
-
- Earned some good credits
- Posts: 102
- Joined: Thu Dec 28, 2006 5:12 pm
- Location: Indiana, US
Trouble with panels that overlap
In my window, I have a small panel that is 200x200. In that panel is a static text. I also have another panel the same size that partially overlaps the first panel.
The problem is that the static text portion of the lower panel shows through the panel on top. Is there any way to get the top panel to overlap even the static text in the lower panel? I don't want to just set the text's Show to false because I'd like to be able to see the portion that isn't overlapped.
The problem is that the static text portion of the lower panel shows through the panel on top. Is there any way to get the top panel to overlap even the static text in the lower panel? I don't want to just set the text's Show to false because I'd like to be able to see the portion that isn't overlapped.
-
- Earned some good credits
- Posts: 102
- Joined: Thu Dec 28, 2006 5:12 pm
- Location: Indiana, US
I'm using a raised border panel for the front of a flash card that has numbers on it. I'm using another raised border panel with a different background color for the backside of another card. That panel/card covers over most, but not all, of the other card with numbers on it.
It works just fine when there is no static text on the first panel. But as soon as I add static text (the numbers) to that panel, they show through the panel that represents the top card. Not everything shows through, only the section that contains the static text.
I don't want to get crazy with drawing things; I'm just wanting to keep this simple. If there's no way to do it, I can change my implementation.
It works just fine when there is no static text on the first panel. But as soon as I add static text (the numbers) to that panel, they show through the panel that represents the top card. Not everything shows through, only the section that contains the static text.
I don't want to get crazy with drawing things; I'm just wanting to keep this simple. If there's no way to do it, I can change my implementation.
-
- Earned some good credits
- Posts: 102
- Joined: Thu Dec 28, 2006 5:12 pm
- Location: Indiana, US
-
- Earned some good credits
- Posts: 102
- Joined: Thu Dec 28, 2006 5:12 pm
- Location: Indiana, US
forrestcupp wrote: I set the wxCLIP_CHILDREN bit in panel2, but that didn't do the trick.
Is that what I was supposed to do?
I've tried to reproduce what you said, in wxGTK2.8.9. It works without any extra bits and settings, see attached image. Both texts are larger than parent pane and both are clipped. If you want I can post XRC for this.
Actually each of two panels and texts are (should be) different windows and painting over one window being child of another is technically tricky!
could it be that you created wxStaticText as child of top level pane and not child of panel2 ?
- Attachments
-
- panels.png (3.2 KiB) Viewed 2264 times
-
- Earned some good credits
- Posts: 102
- Joined: Thu Dec 28, 2006 5:12 pm
- Location: Indiana, US
-
- Earned some good credits
- Posts: 102
- Joined: Thu Dec 28, 2006 5:12 pm
- Location: Indiana, US
-
- Earned some good credits
- Posts: 102
- Joined: Thu Dec 28, 2006 5:12 pm
- Location: Indiana, US
Well, it didn't really solve my problem, but it's what I ended up having to do.Auria wrote:Is this meant to be a card game, like solitaire? In this case I would very strongly recommend drawing, it will be easier for you in the end this way. If not, then I didn't get it, sorry
I wanted to quickly throw this thing together, but I ended up putting a lot more into it than I intended to. I went with drawing for a lot of things.
I guess it's better to do things right.