I have a frame where the window is restricted from MAXIMIZE and RESIZE using
the style flags during instantiation of the Frame. Later when user presses a
button, I want to make the window resizable for which I'm using the
frame.SetWindowStyle method as shown below (included only the instantiation
and method call snippets).
This works well except for the fact that it slightly shrinks the window size
when set and I can see the edges of few of the controls on the UI cropped.
Could anyone please help me figure out what I'm doing wrong.
Probably nothing. IIUC, this is the way I would expect it to work, although it could vary based on platform. A possible workaround to preserve the size of the frame’s content would be to use GetClientSize before the change and SetClientSize after.
···
On Sunday, January 13, 2019 at 2:04:00 PM UTC-8, nitin philip wrote:
Hi,
I have a frame where the window is restricted from MAXIMIZE and RESIZE using
the style flags during instantiation of the Frame. Later when user presses a
button, I want to make the window resizable for which I’m using the
frame.SetWindowStyle method as shown below (included only the instantiation
Thank you Robin for the suggestion. I'm already using the work-around in my
code but was wondering if there was a better way of doing it (or may be not
doing anything at all and the re-sizing be handled automatically )