Ask password dialogue buttons

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller

Post Reply
redfield
Posts: 55
Joined: Thu Apr 04, 2019 1:41 pm

Ask password dialogue buttons

Post by redfield » Wed Mar 25, 2020 6:21 pm

Hello All,
I am wondering if it is possible to change the standard buttons (OK and Cancel) of the ask password dialogue? E. g. 'Yes' instead of 'OK', 'No' instead of 'Cancel'?
Thanks!

bogs
Posts: 4348
Joined: Sat Feb 25, 2017 10:45 pm

Re: Ask password dialogue buttons

Post by bogs » Wed Mar 25, 2020 7:38 pm

You can put any number of buttons on an answer dialog, I don't think (or haven't found) the way to do this specifically with the ask password dialog.
http://lessons.livecode.com/m/4603/l/56 ... h-the-user
Image

Klaus
Posts: 11572
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Ask password dialogue buttons

Post by Klaus » Wed Mar 25, 2020 8:43 pm

Yes, this is possible, because the ASK and ANSWER dialogs are, well, just stacks! :-)
Open the message box, type:

Code: Select all

toplevel "Ask Dialog"
hit ENTER and edit it right away!

Hint:
Do ONLY change the LABEL of these two buttons, but not their NAME!
There are script in the stacks that need them to be named OK and CANCEL.

If you want a "temporary" solution, do like this:

Code: Select all

...
set the LABEL of btn "Cancel" of cd 1 of stack "Ask Dialog" to "No"
set the LABEL of btn "OK" of cd 1 of stack "Ask Dialog" to "Yes"
ask password...
...

Klaus
Posts: 11572
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Ask password dialogue buttons

Post by Klaus » Wed Mar 25, 2020 8:46 pm

If you are on a Mac then only the "temporary" solution is possible, since we are not allowed
to save things/stacks inside of the app package in the APPLICATION folder!

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”