public Sub GetViewDim(aObject As Object) As TRectDim
Private Result As TRectDim
If aObject Is View Then
Try
Private locView As View
locView = aObject
Result.Initialize(locView.Left, locView.Top, locView.Width, locView.Height)
Catch
Log(LastException)
Private locActivity As Activity
locActivity = aObject
Result.Initialize(locActivity.Left, locActivity.Top, locActivity.Width, locActivity.Height)
End Try
Else
If aObject Is CustomListView Then
Private locCLV As CustomListView
locCLV = aObject
Result.Initialize(locCLV.Left, locCLV.Top, locCLV.Width, locCLV.Height)
Else
RaiseException("[GetViewDim] Unknown View "&GetType(aObject), False, True)
End If
End If
Return Result
End Sub