Hello,
I am creating a modal window with "Ok" and "Cancel" button. How can I leave the "Ok" button greyed out if the user did not enter any information in one of the inputs?
Thank you.
// User Interface Window to get some data
UIwin = New Window( "User Input",
Show Menu( 0 ),
Show Toolbars( 0 ),
<<MODAL></MODAL>
</CODE></PRE><P> </P></LINGO-BODY><LINGO-LABS id="lingo-labs-372270" slang="en-US" mode="NONE"><LINGO-LABEL>Mass Customization</LINGO-LABEL><LINGO-LABEL>Quality and Process Engineering</LINGO-LABEL></LINGO-LABS><LINGO-SUB id="lingo-sub-372293" slang="en-US" mode="NONE">Re: How to grey out OK button if user input is missing</LINGO-SUB><LINGO-BODY id="lingo-body-372293" slang="en-US" mode="NONE"><P>You could use the Enable() message, like this:</P>
<P> </P>
<PRE><CODE class=" language-jsl">names default to here(1);
CheckInput = function({},
write("here");
UserInput1 = String1 << get text();
UserInput2 = String2 << get text();
if(
(length(UserInput1) > 0 ) & (length(Userinput2) > 0),
bbOK << Enable(1),
bbOK << Enable(0)
)
);
// User Interface Window to get some data
UIwin = New Window( "User Input",
Show Menu( 0 ),
Show Toolbars( 0 ),
<<MODAL></MODAL>