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:
parent
c638f1611f
commit
6433c9f689
4 changed files with 9 additions and 8 deletions
|
@ -652,6 +652,7 @@ SUB __UI_ProcessInput
|
|||
IF __UI_KeyHit THEN __UI_HasInput = True
|
||||
|
||||
'Adjust the Resize Status of this form based on its CanResize property:
|
||||
IF __UI_DesignMode = False THEN
|
||||
IF Control(__UI_FormID).CanResize <> __UI_CurrentResizeStatus THEN
|
||||
__UI_CurrentResizeStatus = Control(__UI_FormID).CanResize
|
||||
IF __UI_CurrentResizeStatus THEN
|
||||
|
@ -660,12 +661,13 @@ SUB __UI_ProcessInput
|
|||
_RESIZE OFF
|
||||
END IF
|
||||
END IF
|
||||
END IF
|
||||
|
||||
'Resize event:
|
||||
'(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.
|
@ -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, "")
|
||||
|
|
BIN
UiEditor.exe
BIN
UiEditor.exe
Binary file not shown.
Loading…
Reference in a new issue