Hi, I’m a newbie and am trying to resize my graphics window. When I try to resize it using the “resizable” option for the frame, I’m only able to resize the frame itself, not the picture in the frame if that makes sense. How do I resize the whole graphics window (frame and picture)? I attached my Xojo binary project so you can see what I mean in case it’s not clear from my question.
Thanks, Michel. I don’t have a separate window Resized event. All I did was change the slider for the graphics window to “Resizeable” - should I not even use that option then, or use it in tandem with the new event? For the window Resized event, what would the pseudocode be? What do you mean by setting “the number to whatever the smaller side of the window is”? Thanks again.
All windows have a RESIZED and a RESIZING event. But they are not attached to the window by default…
You must add the event, just like you need to add events for MOUSEDOWN, MOUSEMOVE etc… etc…
The RESIZING event fires while the window is changing size (assuming you checked LIVE RESIZE
The RESIZED event fires when you release the mouse after RESIZING the window
Both of these events require the Windows RESIZABLE property to be set [see the Inspector]
Just add it by a right click on it and add… the same way you proceeded to add Pain, or the 8 other events you have already for GraphicsWindow. You did create that program yourself, did you not ?
Thanks, guys. I added the RESIZED and RESIZING events and set the window so that the frame is Resizeable and so that it enables Live Resize. I also added the following code to each event
App.SquareWidth = 600 / App.Size
But I still have the same problem, where the window is resizable but not the picture (contents) of the frame itself. Any suggestions?
[quote=94001:@Samuel Cohen]I added the RESIZED and RESIZING events and set the window so that the frame is Resizeable and so that it enables Live Resize. I also added the following code to each event
App.SquareWidth = 600 / App.Size
But I still have the same problem, where the window is resizable but not the picture (contents) of the frame itself. Any suggestions?[/quote]
You may want to ask the person who created the program for help.
The line I indicated is part of the Open event of the App. By itself, it cannot redraw anything. The whole code in the Open event is used to draw the square. So that is what you want to copy, and set the size of the square relative to the smaller side of the window.