Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Read-only control sources

Status
Not open for further replies.

fruityBoy

Programmer
Jul 21, 2000
51
GB
Hi

I don't know if anybody has come across this (or maybe I'm just daft, but I did not find any mention of this in MSDN), but I was building up a control source for a text box in code, and I accidentally included it in brackets, so my control source in affect was somthing like (customertable.cu_ref).

I found that this makes the control readonly... So basically :

(controlsource) &&<----readonly
controlsource &&<--- read / write

Am I missing somthing fundamental, or have I stumbled across an undocumented feature?

I'm using Vis Fox 7, I haven't tried earlier versions yet.

Thanks

Simon
 
Hi

I think I've just found the answer, fox is evaluating what i put in brackers, like EVAL.

So

bob = &quot;sid&quot;
sid = &quot;hello&quot;

if I set my text control source to bob, it will display &quot;sid&quot; on the form.

however, if I set the control source to (bob) it displays &quot;hello&quot; on the form.

Useful for dynamic control sources I think...
 
Yeah, cos I put it in brackets, it was trying to evaluate the control source and returning an error, hence read only..
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top