Draw an image on top of a text area gadget

BlitzMax Forums/BlitzMax Beginners Area/Draw an image on top of a text area gadget

Qweeg(Posted 2006) [#1]
I have a full screen gui window with a canvas on it which in turn has a textarea field on (the canvas is the parent). When an image is drawn on the canvas if it is partially or fully overlapping the textarea position I want it to be drawn over the top of it i.e. so the textarea becomes obscured.

But I don't seem to be able to do this - the image always appears underneath the textarea. Is this possible, and if so could anyone point me in the right direction please?


CS_TBL(Posted 2006) [#2]
afaik, that's a nono

try Plan B :P


skidracer(Posted 2006) [#3]
The parent is always behind a child gadget. Try using a panel for the parent of both the TextField and the Canvas (the order that you then create the TextField and Canvas may be important as older child gets drawn first I think).


Chris C(Posted 2006) [#4]
theres a winapi call that changes Z order see my site for the tutorial about intercepting events with Z order


Dreamora(Posted 2006) [#5]
What is the exact use of draw it over the text? The text will simply become invisible so you could disable it and only display the canvas instead? (it can't blend in if you wanted to do something like this. For this you could try to use the GDI Driver module, should have more success)


Qweeg(Posted 2006) [#6]
@Dreamora - It's really just an aesthetic thing. The game is a pool game with a chatbox and text entry field on the bottom left of the screen and the table covering the top two thirds of the screen. When aiming the cue you rotate it around the cue ball. If the cue ball is near the bottom cushion then when the cue rotates around it at certain points the butt is under the text and chat boxes. This just looks slightly odd because part of the cue disappears and would be better if it was above the boxes.

@Chris and Skid - thanks for the ideas, i'll have a look at these options later today.