The only thing that comes to mind is the autosize, after doing everything say autosize = .T.
Hope this fixes you prob
>Hi All,
>
>Why does the caption only display the first four characters when adding a label dynamicly? When I hard coded (as a test) a string of 20 characters for the caption only the first four displayed. It has got to be something simple.
>
>The code on the init event of a container (form) is:
>
>lcText = ALLTRIM(This.oCallingForm.cMyLabelCaptionText)
>lnWidth = LEN(lcText)
>
>This.AddObject("lblMyLabel", "cLabel")
>WITH This.lblMyLabel
> .AutoSize = .F. && Turn off default autosizing
> .Width = lnWidth + 4
> .Top = 24
> .Left = 1
> .Caption = lcText
> .Left = 10
> .Visible = .T.
>ENDWITH
>
>Thanks for your help...
>
>Robert