Page 1 of 1
Setting specific size to the answer windows
Posted: Fri Aug 07, 2015 6:34 pm
by Pistris
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
Re: Setting specific size to the answer windows
Posted: Fri Aug 07, 2015 7:00 pm
by jmburnod
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
Re: Setting specific size to the answer windows
Posted: Fri Aug 07, 2015 7:55 pm
by Pistris
Thankyou so much
am gonna modify it so i can pass size parameters too
edd.
Re: Setting specific size to the answer windows
Posted: Sat Aug 08, 2015 3:00 am
by golive
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?
Re: Setting specific size to the answer windows
Posted: Sat Aug 08, 2015 4:38 am
by SparkOut
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.
Re: Setting specific size to the answer windows
Posted: Mon Aug 10, 2015 1:26 am
by golive
Do you see any script lines if you open:
I don't and would like to know how to see the code.
Re: Setting specific size to the answer windows
Posted: Mon Aug 10, 2015 2:11 am
by Simon
HI golive,
In the menubar
View > Livecode UI Elements in Lists
Simon
Re: Setting specific size to the answer windows
Posted: Mon Aug 10, 2015 5:59 am
by golive
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:
I expected to see code to make the answer dialogue work.
Am I looking in the wrong place?
Re: Setting specific size to the answer windows
Posted: Mon Aug 10, 2015 7:04 pm
by Simon
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
Re: Setting specific size to the answer windows
Posted: Tue Aug 11, 2015 2:24 am
by golive
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?
Re: Setting specific size to the answer windows
Posted: Tue Aug 11, 2015 4:20 am
by Simon
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
Re: Setting specific size to the answer windows
Posted: Tue Aug 11, 2015 5:23 pm
by jacque
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.