[SOLVED] 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: FourthWorld, heatherlaine, Klaus, kevinmiller

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

[SOLVED] 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!
Last edited by redfield on Mon Apr 06, 2020 11:14 am, edited 1 time in total.

bogs
Posts: 5480
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: 14194
Joined: Sat Apr 08, 2006 8:41 am
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: 14194
Joined: Sat Apr 08, 2006 8:41 am
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!

redfield
Posts: 95
Joined: Thu Apr 04, 2019 1:41 pm

Re: Ask password dialogue buttons

Post by redfield » Mon Apr 06, 2020 11:14 am

Okay I'm on Linux and used the temporary solution, which works well. I wasn't aware that those dialogues are stacks :shock: . Many thanks!

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10049
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Ask password dialogue buttons

Post by FourthWorld » Mon Apr 06, 2020 3:39 pm

redfield wrote:
Mon Apr 06, 2020 11:14 am
I wasn't aware that those dialogues are stacks :shock: . Many thanks!
Inspiration: LiveCode is made with LiveCode. Everything you see in the IDE is scripted in LiveCode. It's all infinitely moddable.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

Post Reply