Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Display 'Yes' - 'No' for logical value in grid.
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00450221
Message ID:
00450229
Vues:
19
Joe,

If it's a readonly display of the date you can make the ControlSource iif(table.field, "Yes", "No " )

>I was hoping that with the following code I could display "Yes" or "No" in place of T or F in a grid.
>My textbox is just blank though. Any tips?
>
>define class MyTextYesNo as TextBox
> procedure init
> if evaluate(this.parent.parent.controlsource)
> this.value='Yes'
> else
> this.value='No'
> endif
> endproc
>enddefine
>
>define class MyGridYesNo as Column
> ADD OBJECT Header1 AS Header
> Add Object Text1 as MyTextYesNo with Borderstyle=0
> readonly=.t.
> bound=.f.
> procedure init
> PARAMETER tcCaption, tcControlSource, tnWidth
> this.Header1.Caption = tcCaption
> this.resizable=.f.
> this.ControlSource = tcControlSource
> this.width=tnWidth
>enddefine
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform