Newbies Colm the Alchemist Posted May 12, 2004 Newbies Posted May 12, 2004 Please can someone tell me how to make a button appear greyed-out and un-pressable? I've come across it in a stand-alone database (from Developer), but I can't access the code. The idea would be to make a button "live" only when certain fields have been filled in. Can it be done without a plug-in? If not, what plug-in would I need? If I could trigger a layout from a field, I guess I could do it that way. But how?
QuinTech Posted May 12, 2004 Posted May 12, 2004 Hi Colm, try adding some steps at the beginning of your script: ---------- If ( IsEmpty ( RequiredField1 ) or IsEmpty ( RequiredField2 ) ) Show Message ( "You must fill in all fields" ) Exit Script End If ---------- If you want the greyed-out look, you can create two calc fields which perform all the validation tests on your required fields. One field, ShowButton, evaluates to "Button Name" if all conditions are met, the other, NoShowButton, evaluates to "Button Name" if conditions are NOT met. Remove the text label from your button, and put these two new fields right over the button. Make ShowButton black text and NoShowButton grey text. You now have a greyed-out button with one peculiarity, that you can still "press" the button (that is, see the button action on the screen). HTH Jerry
Ender Posted May 12, 2004 Posted May 12, 2004 A couple other methods: Use a duplicate layout with greyed out buttons with buttons disabled. This works well if you have many buttons that are either all available or all unavailable based on some criteria. Put your buttons in global container fields, then put container calc fields on the layout. If( Criteria, ButtonGraphicOn, ButtonGraphicOff ).
RalphL Posted May 12, 2004 Posted May 12, 2004 Another method uses portals to contain the buttons when the relationship is valid the buttons show and are active. When the relationship fails the buttons diasappear and are inactive. See the attached file for details.
Recommended Posts
This topic is 7761 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now