Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Not Necessary but would be nice
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00139787
Message ID:
00140569
Views:
32
Argh! Repost due to eaten code:

Yes, of course that would work. It just wouldn't be very intuitive in a calculator context. You could add a trap for the +,-,/,*,= keys and parse that to the alpha equivalent label on the button perhaps, but you would still need an alpha based shortcut key to appear on the button, ie:
Caption = " + \<A"
This gives you an ugly caption, but that can be overcome by padding the length of the label out and re-sizing the button so that the "\<A" is cut off on the right:
Caption = &quot; +       \&lt;A&quot;
Another problem comes into play when using the '=' character. VFP uses '=' to indicate the value is to be evaluated, so you need to use:
Caption = &quot; &quot; + chr(61) + &quot;      \&lt;E&quot;
.

>
>Run the following code and press ALT+A (like Add *s*):
>
>Public oForm
>oForm = Create("frmTest")
>oForm.Show
>
>Define Class frmTest as Form
>   Add Object Command1 As Commandbutton With ;
>      Height = 25, ;
>      Width = 25, ;
>      Caption = "  +   \<A"
>Enddefine
>Christof
kenweber
GCom2 Solutions
Microsoft Certified Professional

Previous
Reply
Map
View

Click here to load this message in the networking platform