Add a GUI API for checking if a control must be animated.
[GB.GUI.BASE] * NEW: Add a GUI API for checking if a control must be animated.
This commit is contained in:
parent
4d299a1eac
commit
9f8f4a9b15
1 changed files with 20 additions and 0 deletions
|
@ -381,3 +381,23 @@ Static Public Sub GetForeground(hCtrl As Control, iFg As Integer) As Integer
|
|||
Return Color.Merge(iFg, Style.BackgroundOf(hCtrl))
|
||||
|
||||
End
|
||||
|
||||
Static Private Sub GetTopLevel(hCtrl As Control) As Window
|
||||
|
||||
Dim hWin As Window
|
||||
|
||||
Do
|
||||
hWin = hCtrl.Window
|
||||
If hWin.TopLevel Then Return hWin
|
||||
hCtrl = hWin.Parent
|
||||
Loop
|
||||
|
||||
End
|
||||
|
||||
|
||||
Static Public Sub MustAnimate(hCtrl As Control) As Boolean
|
||||
|
||||
If Not Application.Animations Then Return
|
||||
If GetTopLevel(hCtrl) = Application.ActiveWindow Then Return True
|
||||
|
||||
End
|
||||
|
|
Loading…
Reference in a new issue