Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Center form's caption
Message
 
 
To
06/04/2000 14:35:28
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00356420
Message ID:
00356457
Views:
14
>>Hi everyone,
>>
>>Simple problem: I want to center caption of my form, so I tried:
>>
>>
>>this.caption=padc('Table Maintenance for '+proper(pcTable),this.width)
>>
>>Didn't work.
>>
>>What should I do?
>
>
Nadya,
>Caption font and size changes by installation. You should first read its setting. Assuming it's Arial,12 you could do something like this :
>
*form.init
>this.caption = ;
>  padc(this.caption,;
>  (WCOLS( )-;
>  TXTWIDTH(this.caption,'Arial',12)*;
>  FONTMETRIC(6,'Arial',12)/FONTMETRIC(6)))
Cetin

Hi Cetin,

Doesn't work :( Visually seems to closer to left corner:
local lcCaption
lcCaption='Table Maintenance for '+ proper(pcTable)
this.caption = ;
     padc(lcCaption,;
     (wcols( )-;
     txtwidth(lcCaption,'Arial',12)*;
     fontmetric(6,'Arial',12)/fontmetric(6)))
I tried this.FontName, this,FontSize instead of Areal,12 and wfont(1),wfont(2),wfont(3). Same result for all three attempts...
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform