how do you expect to draw to the graphics of the window outside its paint event since thats not possible any more ?
ie/ textchange cant access the graphics of the containing window to draw to it
would seem the only decent way would be to have the window call a method in your text field during the windows paint event that would allow the text field to draw into the window graphics
I guess I didn’t follow your question. You seem to have found your own way, but what about making the window an observer of the control? Probably more work than what you’re doing though.
That would not solve the problem of how to give the TextField access to the Windows graphics context for drawing. It would still require the same amount of code in addition to setting up an observer pattern as far as I can see.
[quote=434204:@JulianS]Michel’s idea seems to work ok, I don’t know why you got a NOE.
Thanks. That project crashed for me too, but that got me on the right track: after emptying my cache and restarting the computer it now works as expected. My Mac usually runs for weeks or even months and only restarts for rare system updates and I keep forgetting that if I run Xojo for a long time then it can get itself into a weird state.
if this were a control to be wrapped up and given to others and someone had their own backdrop on a window then you’ve drawn on that backdrop - possibly in a way that is not reversible