1
1
Fork 0
mirror of https://github.com/FellippeHeitor/InForm.git synced 2025-01-15 11:59:34 +00:00

Issue #7: Forms can be resized freely while in design mode.

This commit is contained in:
FellippeHeitor 2018-03-10 02:12:42 -03:00
parent c638f1611f
commit 6433c9f689
4 changed files with 9 additions and 8 deletions

View file

@ -652,12 +652,14 @@ SUB __UI_ProcessInput
IF __UI_KeyHit THEN __UI_HasInput = True
'Adjust the Resize Status of this form based on its CanResize property:
IF Control(__UI_FormID).CanResize <> __UI_CurrentResizeStatus THEN
__UI_CurrentResizeStatus = Control(__UI_FormID).CanResize
IF __UI_CurrentResizeStatus THEN
_RESIZE ON
ELSE
_RESIZE OFF
IF __UI_DesignMode = False THEN
IF Control(__UI_FormID).CanResize <> __UI_CurrentResizeStatus THEN
__UI_CurrentResizeStatus = Control(__UI_FormID).CanResize
IF __UI_CurrentResizeStatus THEN
_RESIZE ON
ELSE
_RESIZE OFF
END IF
END IF
END IF
@ -665,7 +667,7 @@ SUB __UI_ProcessInput
'(Triggered either programatically or by directly resizing the form):
DIM CheckResize AS _BYTE
CheckResize = _RESIZE
IF (CheckResize AND Control(__UI_FormID).CanResize) OR __UI_CurrentBackColor <> Control(__UI_FormID).BackColor OR Control(__UI_FormID).Width <> _WIDTH(0) OR Control(__UI_FormID).Height <> _HEIGHT(0) THEN
IF (CheckResize AND Control(__UI_FormID).CanResize) OR (CheckResize AND __UI_DesignMode) OR __UI_CurrentBackColor <> Control(__UI_FormID).BackColor OR Control(__UI_FormID).Width <> _WIDTH(0) OR Control(__UI_FormID).Height <> _HEIGHT(0) THEN
_DELAY .1
IF CheckResize THEN
Control(__UI_FormID).Width = _RESIZEWIDTH

Binary file not shown.

View file

@ -5,7 +5,6 @@ SUB __UI_LoadForm
DIM __UI_NewID AS LONG
$RESIZE:ON
_RESIZE OFF
__UI_NewID = __UI_NewControl(__UI_Type_Form, "Form1", 300, 300, 0, 0,0)
Control(__UI_NewID).Font = SetFont("segoeui.ttf?arial.ttf?/Library/Fonts/Arial.ttf?InForm/resources/NotoMono-Regular.ttf?cour.ttf", 12, "")

Binary file not shown.