Normal Topic Disabling or changing default color for read only (Read 1574 times)
david.lyon@cgi.com
Member
*
Offline



Posts: 16
Location: Ottawa, Ontario, Canada
Joined: Jun 19th, 2006
Disabling or changing default color for read only
Oct 5th, 2006 at 4:07pm
Print Post Print Post  
setting read only on a layout element results in a color change to the associated label to a color that is not readable.

How do you disable this color change while keeping security

- or -

How do you change the default color used



Dave Sad
  
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Disabling or changing default color for read o
Reply #1 - Oct 5th, 2006 at 5:36pm
Print Post Print Post  
You can choose Read Only - Not Grayed Out. This will make the element read only but will not change how it is drawn. Then, you can make it whatever colors you wish.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
david.lyon@cgi.com
Member
*
Offline



Posts: 16
Location: Ottawa, Ontario, Canada
Joined: Jun 19th, 2006
Re: Disabling or changing default color for read o
Reply #2 - Oct 5th, 2006 at 5:40pm
Print Post Print Post  
I chose READ-ONLY

Sesame grays it out

I don't want Sesame to gray it out
  
Back to top
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Disabling or changing default color for read o
Reply #3 - Oct 5th, 2006 at 5:50pm
Print Post Print Post  
As Erika said chose "Read Only - Not Grayed Out" as opposed to choosing "Read Only".

If you insist on using "Read Only", and for some reason can't use, "Read Only - Not Grayed Out", then use the brightest color your can for the label and place it on a relatively dark background. The code works by "brightening" any color you select. If you select a bright color, it will not be able to brighten it further and you will see little to no change in readability.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
david.lyon@cgi.com
Member
*
Offline



Posts: 16
Location: Ottawa, Ontario, Canada
Joined: Jun 19th, 2006
Re: Disabling or changing default color for read o
Reply #4 - Oct 6th, 2006 at 4:07pm
Print Post Print Post  
Sad

Have been unable to locate the "READ ONLY DO NOT GRAY-OUT" option.

Could someone please explain where this option is located.

Thanks
Dave
  
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Disabling or changing default color for read o
Reply #5 - Oct 6th, 2006 at 4:24pm
Print Post Print Post  
In Designer, open the Form you want to affect.

Click on the desired element to select it.

On the Property Editor control panel (left side of the screen) choose the Other Tab.

There is a dropdown on this tab for Read Only. You will find the Read Only - Not Grayed Out choice on that dropdown.


See the 1.1 Sesame User Guide Pages 116-117 for further info and a screenshot.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
david.lyon@cgi.com
Member
*
Offline



Posts: 16
Location: Ottawa, Ontario, Canada
Joined: Jun 19th, 2006
Re: Disabling or changing default color for read o
Reply #6 - Oct 6th, 2006 at 5:05pm
Print Post Print Post  
I would think that setting the Read Only - Not Grayed Out on the Form Design would make the form element read only for all users.
(Please confirm this understanding).

This is not what I'm trying to do.

Some users have full access, others have read-only.

I'm using the security manager to define two groups, one with full access the other with read-only access.

Setting the read-only attribute for the read-only group causes Sesame to display the associated layout element label as grayed-out.
This is the behaviour that I wish to change.

Dave

  
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Disabling or changing default color for read o
Reply #7 - Oct 6th, 2006 at 5:19pm
Print Post Print Post  
Dave,

Quote:
I would think that setting the Read Only - Not Grayed Out on the Form Design would make the form element read only for all users. 
(Please confirm this understanding).


Yes, that is correct.

However, you can do this dynamically by writing a bit of SBasic in the OnFormEntry event of your Form. There is a function called @UserID which returns the current user. There is also a function called @Group which returns the Security Group of the current user. You can use either of these do you what you want. For example:

Code
Select All
If @Group = "No_Can_Do"
{
    ReadOnly(MyField, 2)
}
Else
{
    ReadOnly(MyField, 0)
} 



This method allows you a tremendous amount of control over who can do what and under what circumstances.

You can also create entirely different forms bound tot he same database that are meant to be used by certain users. Each Form can have it's own settings, programming and elements appropriate for that user.

I wrote an article about implementing security roles for Inside Sesame that details these methods. Svetlana mentioned that she intended to get the back issues, so she may have a copy of this article available.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
david.lyon@cgi.com
Member
*
Offline



Posts: 16
Location: Ottawa, Ontario, Canada
Joined: Jun 19th, 2006
Re: Disabling or changing default color for read o
Reply #8 - Oct 6th, 2006 at 5:33pm
Print Post Print Post  
If all the elements on a form are set to read-only can the form be used to provide search criteria.

  
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Disabling or changing default color for read o
Reply #9 - Oct 6th, 2006 at 5:35pm
Print Post Print Post  
david.lyon@cgi.com wrote on Oct 6th, 2006 at 5:33pm:
If all the elements on a form are set to read-only can the form be used to provide search criteria.



Yes. Read-Only status is lifted for retrieve specs so a user can use those elements to search.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged