Setting specific size to the answer windows

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
Pistris
Posts: 148
Joined: Mon Jul 20, 2015 2:40 am

Setting specific size to the answer windows

Post by Pistris » Fri Aug 07, 2015 6:34 pm

Hi Guys
Is there any parameter i can pass to the with the answer command to specify the size of the window

am getting very big windows even though my message is very short and it does not look good
also can i center the buttons and the text

i tried looking in the dictionary but found nothing.

Edd

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2729
Joined: Sat Dec 22, 2007 5:35 pm
Contact:

Re: Setting specific size to the answer windows

Post by jmburnod » Fri Aug 07, 2015 7:00 pm

Hi Edd,
answer dialog is a stack that you can find in the livecode.app
open the package of you livecode.app.
The stack is here :
content/tools/toolset/palette/revanswerdialog.rev
I have never modified but I think this works
You can also use a group as answer dialog
Best regards
Jean-Marc
https://alternatic.ch

Pistris
Posts: 148
Joined: Mon Jul 20, 2015 2:40 am

Re: Setting specific size to the answer windows

Post by Pistris » Fri Aug 07, 2015 7:55 pm

Thankyou so much
am gonna modify it so i can pass size parameters too

edd.

golive
Posts: 98
Joined: Wed Jul 01, 2015 5:16 am

Re: Setting specific size to the answer windows

Post by golive » Sat Aug 08, 2015 3:00 am

jmburnod wrote:Hi Edd,
answer dialog is a stack that you can find in the livecode.app
open the package of you livecode.app.
The stack is here :
content/tools/toolset/palette/revanswerdialog.rev
I have never modified but I think this works
You can also use a group as answer dialog
Best regards
Jean-Marc
In Windows it is here:
C:\Program Files (x86)\RunRev\LiveCode 7.0.6\Toolset\palettes

I would like to make a simple change.
When I open the stack, there is no code in the script.
How do I make a change?

BTW I made a copy of the stack. When I tried to open it, it gave lots of warning messages.
So then I opened the original. But I don't see any code. So I dont know how to make my change.

Anyone have any ideas?

SparkOut
Posts: 2947
Joined: Sun Sep 23, 2007 4:58 pm

Re: Setting specific size to the answer windows

Post by SparkOut » Sat Aug 08, 2015 4:38 am

Jean-Marc already mentioned using a group as an answer dialogue. It would be simpler by far to create your own answer dialogue by making your customisations to a group or substack and showing/hiding it.

golive
Posts: 98
Joined: Wed Jul 01, 2015 5:16 am

Re: Setting specific size to the answer windows

Post by golive » Mon Aug 10, 2015 1:26 am

Do you see any script lines if you open:

Code: Select all

revanswerdialog.rev
I don't and would like to know how to see the code.

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am

Re: Setting specific size to the answer windows

Post by Simon » Mon Aug 10, 2015 2:11 am

HI golive,
In the menubar
View > Livecode UI Elements in Lists

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

golive
Posts: 98
Joined: Wed Jul 01, 2015 5:16 am

Re: Setting specific size to the answer windows

Post by golive » Mon Aug 10, 2015 5:59 am

Simon wrote:HI golive,
In the menubar
View > Livecode UI Elements in Lists

Simon
Hi Simon
Thanks. I checked that as you instructed.

But there is still no code lines to see:
10-08-2015 2-55-00 PM.png
I expected to see code to make the answer dialogue work.

Am I looking in the wrong place?

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am

Re: Setting specific size to the answer windows

Post by Simon » Mon Aug 10, 2015 7:04 pm

Hi golive,
The scripts are not in the stack but in the card.
And you do understand that I have no idea if this will work once made into a standalone, just showing you the scripts.

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

golive
Posts: 98
Joined: Wed Jul 01, 2015 5:16 am

Re: Setting specific size to the answer windows

Post by golive » Tue Aug 11, 2015 2:24 am

Simon wrote:Hi golive,
The scripts are not in the stack but in the card.
And you do understand that I have no idea if this will work once made into a standalone, just showing you the scripts.

Simon
OIC, thanks. I see the code now.

I want to make a change: put the text onto the clipboard when the user clicks OK.

Something like:

Code: Select all

on revCleanUpAnswerDialog
   #-------------------------------
   #golive - put info on clipboard
   set the clipboardData["text"] to the title of this stack&cr&the text of field 1
   #-------------------------------
Can I just go ahead and change revanswerdialog.rev?
Or is there a better way?

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am

Re: Setting specific size to the answer windows

Post by Simon » Tue Aug 11, 2015 4:20 am

Hi golive,
Pretty much you shouldn't be changing things in the rev... stacks. I don't know if you think you have to but almost always you don't. There is only one case I see it as useful and it's not in the answer dialog.

Code: Select all

on mouseUp
   answer "Are you sure" with "OK" and "Cancel"
   put it
end mouseUp
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7393
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: Setting specific size to the answer windows

Post by jacque » Tue Aug 11, 2015 5:23 pm

Simon is right, it isn't wise to alter the IDE stacks, the repercussions will haunt you later. But you don't need the clipboard change anyway. The title of the stack is always "Answer Dialog" and the text of field 1 will be whatever prompt you sent to it, which your handler already knows.

The location of the buttons are mapped to the standard interface conventions for each OS, which is what your users will expect.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Post Reply