Window MinWidth & MinHeight values, to go with Lock resizing
Posted: Mon Aug 31, 2015 9:08 pm
the Lock Left/Top/Bottom/Right features are brilliant as they make it soooo easy to turn a static window into a resizable one
BUT they don't prevent the WINDOW itself from getting too small, and it seems that the best place for that code would be in the ResizeGadgets() procedure that the IDE generates when Lock gadget checkboxes are set to handle resizing - actually i dont know where else I could put code to control window size seeing as that procedure is being called to handle sizing and it gets overwritten by the IDE so i cant make changes there.
So does anyone have a workaround solution in the meantime, that would allow me to prevent the window from getting too small, but at the same time allow PB's IDE to handle gadget resizing?
my code to prevent resizing is pretty simple, I just BindEvent the resizing event for my window to a procedure, and in that i get WindowWidth() and WindowHeight() like the generated code already does, and then basically "If WindowWidth < MinWindowWidth: WindowWidth = MinWindowWidth", followed by ResizeWindow
So it seems it would be very easy to add! please? huh? please? huhhuh?
BUT they don't prevent the WINDOW itself from getting too small, and it seems that the best place for that code would be in the ResizeGadgets() procedure that the IDE generates when Lock gadget checkboxes are set to handle resizing - actually i dont know where else I could put code to control window size seeing as that procedure is being called to handle sizing and it gets overwritten by the IDE so i cant make changes there.
So does anyone have a workaround solution in the meantime, that would allow me to prevent the window from getting too small, but at the same time allow PB's IDE to handle gadget resizing?
my code to prevent resizing is pretty simple, I just BindEvent the resizing event for my window to a procedure, and in that i get WindowWidth() and WindowHeight() like the generated code already does, and then basically "If WindowWidth < MinWindowWidth: WindowWidth = MinWindowWidth", followed by ResizeWindow
So it seems it would be very easy to add! please? huh? please? huhhuh?
