mirror of
https://github.com/FellippeHeitor/InForm.git
synced 2025-01-15 11:59:34 +00:00
Triggers __UI_ValueChanged for Lists and Toggle controls when...
...their .Value property is changed programatically too.
This commit is contained in:
parent
20e8185a35
commit
e556837149
2 changed files with 24 additions and 4 deletions
|
@ -811,7 +811,9 @@ SUB __UI_UpdateDisplay
|
|||
__UI_DrawRadioButton Control(i), ControlState
|
||||
CASE __UI_Type_CheckBox
|
||||
'Check boxes
|
||||
__UI_StateHasChanged = False
|
||||
__UI_DrawCheckBox Control(i), ControlState
|
||||
IF __UI_StateHasChanged THEN __UI_ValueChanged i
|
||||
CASE __UI_Type_ProgressBar
|
||||
'Progress bars
|
||||
__UI_DrawProgressBar Control(i), ControlState
|
||||
|
@ -836,17 +838,23 @@ SUB __UI_UpdateDisplay
|
|||
'List boxes
|
||||
IF Control(i).InputViewStart <= 0 THEN Control(i).InputViewStart = 1
|
||||
|
||||
__UI_StateHasChanged = False
|
||||
__UI_DrawListBox Control(i), ControlState
|
||||
IF __UI_StateHasChanged THEN __UI_ValueChanged i
|
||||
CASE __UI_Type_DropdownList
|
||||
'Dropdown lists
|
||||
|
||||
__UI_StateHasChanged = False
|
||||
__UI_DrawDropdownList Control(i), ControlState
|
||||
IF __UI_StateHasChanged THEN __UI_ValueChanged i
|
||||
CASE __UI_Type_MenuBar
|
||||
__UI_DrawMenuBar Control(i), ControlState
|
||||
CASE __UI_Type_PictureBox
|
||||
__UI_DrawPictureBox Control(i), ControlState
|
||||
CASE __UI_Type_ToggleSwitch
|
||||
__UI_StateHasChanged = False
|
||||
__UI_DrawToggleSwitch Control(i), ControlState
|
||||
IF __UI_StateHasChanged THEN __UI_ValueChanged i
|
||||
END SELECT
|
||||
END IF
|
||||
|
||||
|
|
|
@ -301,7 +301,10 @@ SUB __UI_DrawToggleSwitch (This AS __UI_ControlTYPE, ControlState AS _BYTE)
|
|||
This.Redraw = False
|
||||
This.ControlState = ControlState
|
||||
This.FocusState = __UI_Focus = This.ID
|
||||
This.PreviousValue = This.Value
|
||||
IF This.PreviousValue <> This.Value THEN
|
||||
__UI_StateHasChanged = True
|
||||
This.PreviousValue = This.Value
|
||||
END IF
|
||||
__UI_TempCaptions(This.ID) = Caption(This.ID)
|
||||
IF This.ParentID THEN Control(This.ParentID).ChildrenRedrawn = True
|
||||
This.PreviousParentID = This.ParentID
|
||||
|
@ -460,7 +463,10 @@ SUB __UI_DrawCheckBox (This AS __UI_ControlTYPE, ControlState AS _BYTE)
|
|||
This.Redraw = False
|
||||
This.ControlState = ControlState
|
||||
This.FocusState = __UI_Focus = This.ID
|
||||
This.PreviousValue = This.Value
|
||||
IF This.PreviousValue <> This.Value THEN
|
||||
__UI_StateHasChanged = True
|
||||
This.PreviousValue = This.Value
|
||||
END IF
|
||||
__UI_TempCaptions(This.ID) = Caption(This.ID)
|
||||
IF This.ParentID THEN Control(This.ParentID).ChildrenRedrawn = True
|
||||
This.PreviousParentID = This.ParentID
|
||||
|
@ -950,7 +956,10 @@ SUB __UI_DrawListBox (This AS __UI_ControlTYPE, ControlState)
|
|||
This.Redraw = False
|
||||
This.ControlState = ControlState
|
||||
This.FocusState = __UI_Focus = This.ID
|
||||
This.PreviousValue = This.Value
|
||||
IF This.PreviousValue <> This.Value THEN
|
||||
__UI_StateHasChanged = True
|
||||
This.PreviousValue = This.Value
|
||||
END IF
|
||||
This.PreviousInputViewStart = This.InputViewStart
|
||||
__UI_TempTexts(This.ID) = Text(This.ID)
|
||||
IF This.ParentID THEN Control(This.ParentID).ChildrenRedrawn = True
|
||||
|
@ -1188,7 +1197,10 @@ SUB __UI_DrawDropdownList (This AS __UI_ControlTYPE, ControlState)
|
|||
This.Redraw = False
|
||||
This.ControlState = ControlState
|
||||
This.FocusState = __UI_Focus = This.ID
|
||||
This.PreviousValue = This.Value
|
||||
IF This.PreviousValue <> This.Value THEN
|
||||
__UI_StateHasChanged = True
|
||||
This.PreviousValue = This.Value
|
||||
END IF
|
||||
This.PreviousInputViewStart = This.InputViewStart
|
||||
__UI_TempTexts(This.ID) = Text(This.ID)
|
||||
IF This.ParentID THEN Control(This.ParentID).ChildrenRedrawn = True
|
||||
|
|
Loading…
Reference in a new issue