Page 1 of 1
[SOLVED] Ask password dialogue buttons
Posted: Wed Mar 25, 2020 6:21 pm
by redfield
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!
Re: Ask password dialogue buttons
Posted: Wed Mar 25, 2020 7:38 pm
by bogs
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
Re: Ask password dialogue buttons
Posted: Wed Mar 25, 2020 8:43 pm
by Klaus
Yes, this is possible, because the ASK and ANSWER dialogs are, well, just stacks!

Open the message box, type:
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...
...
Re: Ask password dialogue buttons
Posted: Wed Mar 25, 2020 8:46 pm
by Klaus
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!
Re: Ask password dialogue buttons
Posted: Mon Apr 06, 2020 11:14 am
by redfield
Okay I'm on Linux and used the temporary solution, which works well. I wasn't aware that those dialogues are stacks

. Many thanks!
Re: Ask password dialogue buttons
Posted: Mon Apr 06, 2020 3:39 pm
by FourthWorld
redfield wrote: ↑Mon Apr 06, 2020 11:14 am
I wasn't aware that those dialogues are stacks

. Many thanks!
Inspiration: LiveCode is made with LiveCode. Everything you see in the IDE is scripted in LiveCode. It's all infinitely moddable.