ATOUTFOX
COMMUNAUTÉ FRANCOPHONE DES PROFESSIONNELS FOXPRO
Visual FoxPro : le développement durable

les labels en relief   



L'auteur

eric leissler
France France
Membre Simple
# 0000002784
enregistré le 06/03/2010
http://www.aumeric.fr
67 ans
LEISSLER Eric
85290 MORTAGNE SUR SEVRE
de la société AUMERIC LOGICIELS
Fiche personnelle


Note des membres
16/20
1 vote


Contributions > 06 - VCX - Bibliothèque de classes visuelles

les labels en relief
# 0000000096
ajouté le 25/11/2004 21:28:34 et modifié le 29/03/2006
consulté 8198 fois
Niveau débutant

Version(s) Foxpro :
VFP 9.0
VFP 8.0
VFP 7.0
VFP 6.0
VFP 5.0
VFP 3.0
FPW 2.6

Description

Bonjour à toutes et à tous

Je voulais trouver une police en relief mais je n'ai rien trouvé d'intéressant alors je me suis fait une classe  pour faire comme si.

Tout est dans le zip, un form d'exemple et le vcx.
Quand je positionne un label, je fait un clik droit, modifier, control A click droit propriété
 et je met la même caption au trois labels.

Quand je suis faineant, je met la caption, que au contener. (Inconvenient je ne vois le label
qu'à l'exécution.
Bonne journée à tous

Ps, je suis prenneur de toute amélioration compatible avec vfp6.0 bien sur
Atoutfoxement votre

Code source :
DEFINE CLASS lbl1 AS container


  Width = 40
  Height = 20
  BackStyle = 0
  BorderWidth = 0
  BackColor = RGB(128,128,255)
  caption = ""
  value = ""
  Name = "lbl1"


  ADD OBJECT label3 AS label WITH ;
    AutoSize = .T., ;
    FontBold = .T., ;
    FontName = "Arial", ;
    FontSize = 10, ;
    BackStyle = 0, ;
    Caption = "lbl1", ;
    Height = 18, ;
    Left = 1, ;
    Top = -1, ;
    ForeColor = RGB(0,0,0), ;
    DisabledForeColor = RGB(0,0,0), ;
    DisabledBackColor = RGB(0,0,255), ;
    Name = "Label3"


  ADD OBJECT label2 AS label WITH ;
    AutoSize = .T., ;
    FontBold = .T., ;
    FontName = "Arial", ;
    FontSize = 10, ;
    BackStyle = 0, ;
    Caption = "lbl1", ;
    Height = 18, ;
    Left = 4, ;
    Top = 2, ;
    ForeColor = RGB(0,0,0), ;
    DisabledForeColor = RGB(0,0,0), ;
    DisabledBackColor = RGB(190,225,252), ;
    Name = "Label2"


  ADD OBJECT label1 AS label WITH ;
    AutoSize = .T., ;
    FontBold = .T., ;
    FontName = "Arial", ;
    FontSize = 10, ;
    BackStyle = 0, ;
    Caption = "lbl1", ;
    Height = 18, ;
    Left = 3, ;
    Top = 0, ;
    Width = 25, ;
    ForeColor = RGB(255,255,255), ;
    BackColor = RGB(0,0,255), ;
    DisabledForeColor = RGB(0,255,255), ;
    Name = "Label1"


  PROCEDURE Init
    local i
    with this
    .label1.caption=iif(.caption#" ",.caption,.label1.caption)
    .label2.caption=.label1.caption
    .label2.fontname=.label1.fontname
    .label2.fontsize=.label1.fontsize
    .label2.top=.label1.top+2
    .label2.left=.label1.left+2
    .label3.caption=.label1.caption
    .label3.fontname=.label1.fontname
    .label3.fontsize=.label1.fontsize
    .label3.top=.label1.top-2
    .label3.left=.label1.left-2
    .label3.wordwrap=.label1.wordwrap
    .label3.height=.label1.height
    .label3.width=.label1.width
    .label2.wordwrap=.label1.wordwrap
    .label2.height=.label1.height
    .label2.width=.label1.width


    endwith

    this.value=This.Label1.caption
  ENDPROC


  PROCEDURE Refresh
    local i
    with this
    .label1.caption=iif(.caption#" ",.caption,.label1.caption)
    .label2.caption=.label1.caption
    .label2.fontname=.label1.fontname
    .label2.fontsize=.label1.fontsize
    .label2.top=.label1.top+2
    .label2.left=.label1.left+2
    .label3.caption=.label1.caption
    .label3.fontname=.label1.fontname
    .label3.fontsize=.label1.fontsize
    .label3.top=.label1.top-1
    .label3.left=.label1.left-1
    .label3.wordwrap=.label1.wordwrap
    .label3.height=.label1.height
    .label3.width=.label1.width
    .label2.wordwrap=.label1.wordwrap
    .label2.height=.label1.height
    .label2.width=.label1.width


      endwith
  ENDPROC


ENDDEFINE

Commentaires
Aucun commentaire enregistré ...

Publicité

Les pubs en cours :


www.atoutfox.org - Site de la Communauté Francophone des Professionnels FoxPro - v3.4.0 - © 2004-2024.
Cette page est générée par un composant COM+ développé en Visual FoxPro 9.0-SP2-HF3