custom answer boxes
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
custom answer boxes
Im not sure if you can customise the ones that are built in or if i would have to code my own answer pop up. I know i can design it to be a warning with an OK and Cancel but it would also be nice to have a checkbox that says "Don't show this warning again". I assume im going to have to create my own thing.
Re: custom answer boxes
Well, that was how I went making this -
but from what I understand you should be able to customize the ask and answer dialogs pretty far. I haven't done it yet, but dialogData is a global that should be returning the information you ask for is what I got out of my reading of this page.
I doubt something like your talking about is going to be all that complicated either road.
but from what I understand you should be able to customize the ask and answer dialogs pretty far. I haven't done it yet, but dialogData is a global that should be returning the information you ask for is what I got out of my reading of this page.
I doubt something like your talking about is going to be all that complicated either road.
Re: custom answer boxes
Holy crap thats so awesome. This would be exactly what i need and this opens so many more possibilities. wow. thanks.
-
- VIP Livecode Opensource Backer
- Posts: 9647
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: custom answer boxes
It is possible to modify the "text" portion of these dialogs, but I do not know if it is possible to modify the controls that are pre-packaged with them.
I would roll your own, as you suspected. That is easy, likely easier that modifying the global that Bogs mentioned. And then you can change its size, color, whatever. Heck, you could even open a DG of type form, but I am hoping that is vastly overkill.
Craig Newman
I would roll your own, as you suspected. That is easy, likely easier that modifying the global that Bogs mentioned. And then you can change its size, color, whatever. Heck, you could even open a DG of type form, but I am hoping that is vastly overkill.
Craig Newman
-
- VIP Livecode Opensource Backer
- Posts: 327
- Joined: Sun Apr 15, 2012 1:17 am
- Location: USA
- Contact:
Re: custom answer boxes
It is easier to create your own "dialog". It just takes a substack that you set as "modal". It can replace your "ask" or "answer" dialog.
2. On your original stack
That's it
For a simple example see here: https://sites.google.com/a/pgcps.org/li ... s_palettes
1. Create a substack and design your dialog box on itModal - for blocking other actions
A modal dialog box is a window/stack that blocks all other actions as long as the stack is displayed. An example is "Ask" and "Answer" dialog boxes. You can not do anything else as long as it is open.
2. On your original stack
Code: Select all
modal stack "Pop-up"
or
go stack "Pop-up" as modal
For a simple example see here: https://sites.google.com/a/pgcps.org/li ... s_palettes
Cyril Pruszko
https://sites.google.com/a/pgcps.org/livecode/
https://sites.google.com/a/setonhs.org/app-and-game-workshop/home
https://learntolivecode.com/
https://sites.google.com/a/pgcps.org/livecode/
https://sites.google.com/a/setonhs.org/app-and-game-workshop/home
https://learntolivecode.com/
Re: custom answer boxes
My pleasure, glad to be able to help
As the others mentioned, rolling your own isn't overly complicated either, in fact it was scary easy.
I am curious as I've seen differing opinions as to the advantage of opening it as 'modal' vs. 'modeless'. Modal is blocking right? In other words, you can't interact with any other windows until the modal one is dismissed?
And modeless would allow interaction with things even when the dialog is up? Curious as to what others think is better and why.
BTW, good explanations on the page linked in newbie's post.
Re: custom answer boxes
using modal was what i needed so it would block everything else while waiting for a reply.
seeing as i was creating one of those pesky warning boxes that say Ok or Cancel i wanted a check mark too to allow my to say "Dont show this warning again". This allows me to perfectly send back an ok or cancel along with the highlight of the checkbox
seeing as i was creating one of those pesky warning boxes that say Ok or Cancel i wanted a check mark too to allow my to say "Dont show this warning again". This allows me to perfectly send back an ok or cancel along with the highlight of the checkbox
Re: custom answer boxes
The text of answer or ask is intepreted as htmlText, so you can use HTML to produce cool effect.
For example:
For example:
Code: Select all
answer error "<b>Noooo!</b> <br>You shouldn't have clicked that button..."
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w
Re: custom answer boxes
Oh that is too cool Max
-
- VIP Livecode Opensource Backer
- Posts: 327
- Joined: Sun Apr 15, 2012 1:17 am
- Location: USA
- Contact:
Re: custom answer boxes
You can also modify fields using the htmlText property.
See #2 on this webpage - https://sites.google.com/a/pgcps.org/li ... euser/html
but the most common use of it is for showing HTML content without the HTML tags.
See #3 on the same webpage - https://sites.google.com/a/pgcps.org/li ... euser/html
See #2 on this webpage - https://sites.google.com/a/pgcps.org/li ... euser/html
but the most common use of it is for showing HTML content without the HTML tags.
See #3 on the same webpage - https://sites.google.com/a/pgcps.org/li ... euser/html
Cyril Pruszko
https://sites.google.com/a/pgcps.org/livecode/
https://sites.google.com/a/setonhs.org/app-and-game-workshop/home
https://learntolivecode.com/
https://sites.google.com/a/pgcps.org/livecode/
https://sites.google.com/a/setonhs.org/app-and-game-workshop/home
https://learntolivecode.com/