PassoloApp.OnSizeToContent
Passolo fires this event after a "size to content" operation on a dialog control.
Syntax
OnSizeToContent (TransString as PslTransString, PrevWidth as Long, PrevHeight as Long)
TransString The translation string, which is resized
PrevWidth The width of the control before it has been resized
PrevHeight The height of the control before it has been resized
Example
Public Sub PSL_OnSizeToContent(TransString As PslTransString, PrevWidth As Long, PrevHeight As Long)
' Get the current position
Dim x1 As Long, y1 As Long, cx1 As Long, cy1 As Long
Dim x2 As Long, y2 As Long, cx2 As Long, cy2 As Long
TransString.GetSourceRect(x1,y1,cx1,cy1)
TransString.GetRect(x2,y2,cx2,cy2)
' Prevent the control from beeing resized smaller
' than the orignal size
If cx2 < cx1 Then cx2 = cx1
If cy2 < cy1 Then cy2 = cy1
TransString.SetRect(x2,y2,cx2,cy2)
End Sub