(maxgui) refresh canvas from another window
BlitzMax Forums/BlitzMax Beginners Area/(maxgui) refresh canvas from another window
| ||
Hi ! i've the following problem. when i open the second window and move it on the first, the first canvas is not drawn correctly (see the picture). How to resolve this ? Thanks ! |
| ||
I think you will need to have the GL driver for now ... DX + multiple canvas does have some problems |
| ||
When the second window is open, the first canvas doesn't get drawn as you move to another loop (in Draw_second_window()) where you only draw the second canvas. |
| ||
smattbac : I've already added the fellowing code to the Draw_second_window()) into the 'case event_timertick' to redraw the canvas. but I've the similar problem. SetGraphics CanvasGraphics(Canvas1) Cls For Local i=0 To GadgetWidth (Canvas1) Step 32 DrawLine i,0,i,GadgetHeight(Canvas1) Next SetColor 0,40,0 For Local i=0 To GadgetHeight (Canvas1) Step 32 DrawLine 0,i,GadgetWidth(Canvas1),i Next |
| ||
Have you tried using eventhooks? see tutorial 15 here |
| ||
many thanks assari, eventhooks seems the best method. |
| ||
You probably need to act on the GADGETPAINT event via a hook. |
| ||
I've now another problem. When the smallwindow is active i don't want that the user could access (an close) the first window. For example if the user open the second window he can clic into the first window close button... and close the second window ! i've tried to disable the first window (disablegadget MyWindow) into the Show_smallwindow() function... not work ! Thanks for your help ! |