Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Changing the Command Button background
Message
 
À
16/03/2000 17:06:25
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00346739
Message ID:
00347374
Vues:
23
>Can anyone tell me how I can change teh background of the command button. I would like to have a different color other than the gray that is the default (or only color). I know how to change the font but I don't know if I can change teh background so I can have a white button with red letters (caption).
>
>TIA
>
>Jeff T.

Hi Jeff,

This seems to be a pretty hot topic. Let me put it to rest for everyone.

Can you create a command button and specify its background and text colors? Yep, if you have the Microsoft Forms 2.0 ActiveX control CommandButton. I don't know if this control came only with VFP 5.0 or not , but it's a fairly common one, so you may have it.

Unfortunately, in VFP 6.0 SP3 you can't set its Backcolor property from the dialog. You can, however, set it in the control's Init method. Just do the following:

_CLIPTEXT = TRANSFORM(GetColor())

and paste it in the Init.

The font color is a comma delimited list, and you can set that fairly easily.

I've not responded to this question previously simply because I believe in the Windows UI guidelines and try to follow them. If you absolutely, no doubt about it, no other way, quantitatively need this, then here it is. Otherwise, I'd say follow the standards.
George

Ubi caritas et amor, deus ibi est
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform