Hello,
I work with TX Text Control 16 ActiveX and Visual Basic 6. The Text Control on the form is named TXC.
I want to know the height and width of a textframe. This works directly after inserting the frame with TXC.objectHeight, but it doesn't work anymore, when I later select the frame and try to use TXC.objectHeight again. The error message says, that the object settings are not possible or that the object doesn't exist. there is nothing else on the form. My example:
How can I get the frame dimensions from an existing frame?
Thanks for your help and regards,
Rolf
I work with TX Text Control 16 ActiveX and Visual Basic 6. The Text Control on the form is named TXC.
I want to know the height and width of a textframe. This works directly after inserting the frame with TXC.objectHeight, but it doesn't work anymore, when I later select the frame and try to use TXC.objectHeight again. The error message says, that the object settings are not possible or that the object doesn't exist. there is nothing else on the form. My example:
Code:
Private Sub Test_Frame()
'-- Create Frame, read Height and back to body:
TXC.TextFrameInsert -1, 0, 0, 0, 2000, 2000, 3, 20, 20, 20, 20
Debug.Print "Obj.Height = " & TXC.ObjectHeight ' ok, works
TXC.TextFrameSelect (-1)
'-- Later Select frame and read Height:
TXC.TextFrameSelect (1)
Debug.Print "Obj.Height = " & TXC.ObjectHeight ' Error 20036: Obj attributes not ...
End Sub
Thanks for your help and regards,
Rolf