Select Case mProps.Get("TextHorizontalAlignment")
Case "LEFT":Textbox.Gravity = Bit.Or(Gravity.TOP, Gravity.LEFT)
Case "CENTER_HORIZONTAL": Textbox.Gravity = Bit.Or(Gravity.TOP, Gravity.CENTER_HORIZONTAL)
Case "RIGHT":Textbox.Gravity = Bit.Or(Gravity.RIGHT, Gravity.TOP)
End Select
Select Case mProps.Get("TextVerticalAlignment")
Case "TOP" : Textbox.Gravity = Bit.Or(Gravity.LEFT, Gravity.TOP)
Case "CENTER_VERTICAL": Textbox.Gravity = Bit.Or(Gravity.TOP, Gravity.CENTER_VERTICAL)
Case "BOTTOM":Textbox.Gravity = Bit.Or(Gravity.LEFT, Gravity.BOTTOM)
End Select