Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Adding colours to command buttons
Message
 
À
17/09/2004 09:07:46
Brian O'Donovan
Crescent Computers
Cork, Irlande
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00943301
Message ID:
00943522
Vues:
15
Use the commandbutton activex. If you choose this option you need to set the backcolor property in the init of the form.
Public oform1
oform1=createobject("form1")
oform1.AddObject("cmdbutton","cmdbutton")
oform1.Show
Return
Define Class form1 As Form
    DoCreate = .T.
    Caption = "Form1"
    Name = "Form1"
Enddefine
Define Class cmdButton As OleControl
    Procedure Init
       With This
        .Object.BackColor = 255
        .Caption = "Click me!"
       Endwith
      Endproc
OleClass = "forms.commandbutton.1"
Visible = .T.
Height =40
Top = 50
Left = 50
AutoSize = .T.
    Procedure Click
          Messagebox("This is a red button")
      Endproc
Enddefine
>Hi All
>
>I am using vfp6 as my client has win98 on his pcs. I want to color command buttons and put text in them. I am using a plain picture of the colour I want as the picture on the command button, but I would also like to add text over this picture. Other than placing the label control over the command buttin, I was wondering if there was any way of adding text to that command button without the text appearing at the very top of the command button.
>
>Thanks
>
>brian O DONOVAN
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform