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

Click here to load this message in the networking platform