Normal Topic ReadOnly attribute is always greyed out? (Read 630 times)
obfusc88
Full Member
***
Offline


No personal text

Posts: 194
Joined: Dec 17th, 2005
ReadOnly attribute is always greyed out?
Jul 9th, 2017 at 8:49pm
Print Post Print Post  
I wanted to protect the element for Item Number to prevent accidental change/delete.  So I am trying to set the element to be ReadOnly after it has been added.

Using this code if not in Add Mode:
Attribute(ItemNo, 28,"1")                  // Make Read Only
Attribute(ItemNo, 5, "2, 255, 255")            // Change Backfill color to Teal
Attribute(ItemNo, 4, "0,0,0")                  // Text Color BLACK
Attribute(ItemNo, 11, "Lucinda Console")      // Set font

====================
The colors change OK, and the ReadOnly portion works, but the text is always greyed out.  Initially I did not have the lines for Text Color or Font, but added them to try to fix it.  I have also set the default on the design for the element to be ReadOnly, Not greyed out.

What did I forget?
  
Back to top
 
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: ReadOnly attribute is always greyed out?
Reply #1 - Jul 10th, 2017 at 5:26pm
Print Post Print Post  
Hello,

To set ItemNo to be ReadOnly-Not Grayed Out, you want:

Code
Select All
Attribute(ItemNo, 28, 2) 



-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
obfusc88
Full Member
***
Offline


No personal text

Posts: 194
Joined: Dec 17th, 2005
Re: ReadOnly attribute is always greyed out?
Reply #2 - Jul 10th, 2017 at 11:45pm
Print Post Print Post  
Thanks Ray.  Where is that in the documentation?  I was sure I had seen this somewhere a few years ago, but could not locate it.
  
Back to top
 
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: ReadOnly attribute is always greyed out?
Reply #3 - Jul 11th, 2017 at 8:30pm
Print Post Print Post  
Page 346-347 of the Programing guide in the documentation for ReadOnly()

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged