mirror of
https://github.com/FellippeHeitor/InForm.git
synced 2025-01-15 11:59:34 +00:00
Fix a bug that crashed a program without focus-enabled controls + TAB.
This commit is contained in:
parent
e94cda2a11
commit
845afd92ac
5 changed files with 13 additions and 7 deletions
|
@ -1182,7 +1182,7 @@ SUB __UI_UpdateDisplay
|
|||
PrevDest = _DEST
|
||||
_DEST __UI_WaitMessageHandle
|
||||
LINE (0, 0)-STEP(_WIDTH, _HEIGHT), _RGBA32(0, 0, 0, 170), BF
|
||||
_FONT 16
|
||||
_FONT Control(__UI_FormID).Font
|
||||
_PRINTMODE _KEEPBACKGROUND
|
||||
NoInputMessage$ = "Please wait..."
|
||||
COLOR _RGB32(0, 0, 0)
|
||||
|
@ -1344,9 +1344,11 @@ SUB __UI_EventDispatcher
|
|||
|
||||
DO
|
||||
IF _KEYDOWN(100304) OR _KEYDOWN(100303) THEN
|
||||
__UI_FocusSearch = (__UI_FocusSearch + UBOUND(Control) - 2) MOD UBOUND(Control) + 1
|
||||
__UI_FocusSearch = __UI_FocusSearch - 1
|
||||
IF __UI_FocusSearch < 1 THEN __UI_FocusSearch = UBOUND(Control)
|
||||
ELSE
|
||||
__UI_FocusSearch = __UI_FocusSearch MOD UBOUND(Control) + 1
|
||||
__UI_FocusSearch = __UI_FocusSearch + 1
|
||||
IF __UI_FocusSearch > UBOUND(Control) THEN __UI_FocusSearch = 0
|
||||
END IF
|
||||
IF __UI_FocusSearch = __UI_FirstSelectedID THEN
|
||||
'Full circle. No controls can be selected at the moment
|
||||
|
@ -1375,9 +1377,11 @@ SUB __UI_EventDispatcher
|
|||
__UI_FocusSearch = __UI_Focus
|
||||
DO
|
||||
IF _KEYDOWN(100304) OR _KEYDOWN(100303) THEN
|
||||
__UI_FocusSearch = (__UI_FocusSearch + UBOUND(Control) - 2) MOD UBOUND(Control) + 1
|
||||
__UI_FocusSearch = __UI_FocusSearch - 1
|
||||
IF __UI_FocusSearch < 1 THEN __UI_FocusSearch = UBOUND(Control)
|
||||
ELSE
|
||||
__UI_FocusSearch = __UI_FocusSearch MOD UBOUND(Control) + 1
|
||||
__UI_FocusSearch = __UI_FocusSearch + 1
|
||||
IF __UI_FocusSearch > UBOUND(Control) THEN __UI_FocusSearch = 0
|
||||
END IF
|
||||
IF __UI_FocusSearch = __UI_Focus THEN
|
||||
'Full circle. No controls can have focus
|
||||
|
|
|
@ -1311,7 +1311,9 @@ SUB __UI_KeyPress (id AS LONG)
|
|||
LastKeyPress = TIMER
|
||||
SELECT CASE id
|
||||
CASE FileNameTextBox
|
||||
IF Control(FileList).Max > 0 THEN __UI_ListBoxSearchItem Control(FileList)
|
||||
IF OpenDialogOpen THEN
|
||||
IF Control(FileList).Max > 0 THEN __UI_ListBoxSearchItem Control(FileList)
|
||||
END IF
|
||||
END SELECT
|
||||
END SUB
|
||||
|
||||
|
|
Binary file not shown.
|
@ -1275,7 +1275,7 @@ SUB __UI_DrawMenuBar (This AS __UI_ControlTYPE, ControlState AS _BYTE)
|
|||
END IF
|
||||
|
||||
__UI_PrintString __UI_MenuBarOffset, ((This.Height \ 2) - uspacing& \ 2), TempCaption$
|
||||
IF This.HotKey > 0 AND ((__UI_AltIsDown OR Control(__UI_Focus).Type = __UI_Type_MenuBar) OR __UI_DesignMode) THEN
|
||||
IF This.HotKey > 0 AND (__UI_AltIsDown OR Control(__UI_Focus).Type = __UI_Type_MenuBar OR __UI_DesignMode) THEN
|
||||
'Has "hot-key"
|
||||
Temp& = __UI_PrintWidth(CHR$(This.HotKey))
|
||||
LINE (__UI_MenuBarOffset + This.HotKeyOffset, ((This.Height \ 2) + uspacing& \ 2) - 1)-STEP(Temp& - 1, 0), _DEFAULTCOLOR
|
||||
|
|
BIN
UiEditor.exe
BIN
UiEditor.exe
Binary file not shown.
Loading…
Reference in a new issue