Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
LABEL color class
Message
From
02/11/2004 16:14:16
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00951785
Message ID:
00957321
Views:
11
>I did a simple test form, with textbox like before
>Under the setcaption method, an error pops up this line:
> .Height = .&lc_Object..Height + 1
>"unrecognise phrade/keyword"

I get it. You fill the caption with an empty string, right ? If so, remove all the code in SetCaption method, then put this code:
Local ln_X, lc_Object, ln_Left, ln_Len

With This
   .BorderWidth = 0
   If empty( .FontName )
      .FontName = ThisForm.FontName
   endif

   If empty( .FontSize )
      .FontSize = ThisForm.FontSize
   endif

   ln_left = 1

   ln_Len = len( .Caption )
   If (ln_Len > 0)
      For ln_X = 1 to ln_Len
         lc_Object = 'lblName' + transform( ln_X )

         .NewObject( lc_Object, 'lblChar', 'ClsLabel', , ;
            substr(.Caption, ln_X, 1), .FontName, .FontSize, .FontBold )

         With .&lc_Object
            .Top = 1
            .Left = ln_Left
            .Visible = .T.
            ln_Left = ln_Left + .Width - 2
         EndWith
      Next

      .Width = ln_Left + 2
      .Height = .&lc_Object..Height + 1
   endif
EndWith
Herman
Previous
Reply
Map
View

Click here to load this message in the networking platform