No parent/Group for Canvas
BlitzMax Forums/MaxGUI Module/No parent/Group for Canvas
| ||
It seems that we can't generate canvas without a parent window... => Before updating maxGui, we were able to specify "Null" object for parent, that enable the use of a temporary layer for drawing butons, image etc... on a hiden canvas, for a standalone library it's better... but for now, we can't... I had to make a window, and then, parent the window to the canvas. for sure it works, but it makes a window... and of course, it adds extra memory and handles that arent needed :/ Any chance to fix this ? |
| ||
Any chance to fix this ? I don't think this is something that should be "fixed"... Child gadgets (such as buttons, labels, textfields, panels and canvases) require a parent for them to be displayed. If the old MaxGUI driver allowed for this not to be the case then it shouldn't have as it almost certainly won't work cross-platform. Not that I should be encouraging MaxGUI mal-practice, but if you are really stuck, try substituting Desktop() in instead of Null as the parent parameter but I have no idea if this will work as intended. ;-) |
| ||
Ok. for the moment, I'll keep an hidden window. Thanks for answer |
| ||
Ok. for the moment, I'll keep an hidden window. What I will say is that if you are planning on compiling your app on OS X, it will almost certainly fail as, for some reason, OS X doesn't like you opening a graphics context/canvas off screen. A few years ago I needed to do a similar thing and although it worked fine on Windows, Mac is a lot more picky when it comes to things like this. |