Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Determine if =CHR() is in label caption
Message
From
18/12/2003 17:38:03
 
 
To
18/12/2003 17:33:17
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00860538
Message ID:
00860554
Views:
24
This message has been marked as the solution to the initial question of the thread.
>The problem is that I do not know what they all may be. There are many of them used in FPD26 for line drawing, etc and special characters and they are all entered as =CHR(whatever#)...
>

Then the form hack should work just fine after backing it up somewhere for good measure, e.g.
[evaluated expressions in captions are stored like this e.g. caption=" =Chr(195)" is stored Caption = (CHR(195))
here's an updated version to handle both =CHR(x) and ="Some string"
#Define CR Chr(13)
** set those with CHR(x) in label expression to empty caption
Update theForm.scx ;
  set Properties=StrTran(properties, ;
	  "Caption = ("+StrExtract(properties, "Caption = (",CR), ;
	  [Caption = ""]) ;
  where baseclass="label" ;
  and "CHR(" $ Upper(StrExtract(properties, "Caption = (",CR)) 

** set those with ="Some string" to just "Some string"
Update theForm.scx ;
  set Properties=StrTran(properties, ;
	  "Caption = ("+StrExtract(properties, "Caption = (",")"+CR)+")"+CR, ;
	  [Caption = ]+StrExtract(properties, "Caption = (",")"+CR)+CR) ;
  where baseclass="label" ;
  and "Caption = (" $ properties

USE in theForm
Modify Form theForm nowait
Insanity: Doing the same thing over and over and expecting different results.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform