Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Display 'Yes' - 'No' for logical value in grid.
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00450221
Message ID:
00450229
Views:
18
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform