Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to determine tabs needed for caption formating?
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00903326
Message ID:
00903357
Views:
17
I'd suggest using spaces instead of tabs. If you use tabs, you have to take into account the spacing that the tab is using, and that can vary.

To use spaces instead do this:
* Get the longest label and add 1
SELECT max(len(label_name))+1 ;
   FROM mydb!table1 ;
   INTO ARRAY laMaxCaption
Then, when you format the return string, change the line to this:
m.lcReturn = m.lcReturn + ;
      ALLTRIM(m.laCaptions(i,1)) + ;
      REPLICATE(' ',laMaxCaption[1]-len(laCaptions[i,1])+[: ]+ ;
      TRANSFORM(EVALUATE(m.laCaptions(i,2)))+CHR
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform