centering ask & answer dialogs

Wilhelm Sanke sanke at
Fri Oct 17 16:49:13 EDT 2003

On Fri, 17 Oct 2003 , "Ken Ray" <kray at> wrote:

> > As a work around, what I've done is hacked the revAsk and revAnswer
> > stacks and in the preOpen stack handler added "set the loc of me to
> > the screenLoc", since that seems to me to be as good a place as any
> > to display dialog boxes.  Seemed to work fine both using the rev GUI
> > and when I created a stand alone, both on Mac and Win32.  Can anyone
> > thingk of a reason i shouldn't be doing that, or where it will cause
> > problems?
> I can't think of any problems with it; Rev seems to want to center the
> dialog on the defaultStack, so if the defaultStack is partially
> offscreen, the answer/ask dialog is as well. I think what you're doing
> (so long as it is visually acceptable) is a good workaround.
> > and Rev Team:  any chance of including the capability of beinag able
> > to choose where to place ask & answer dialog boxes, using for
> > example:  ask "Can we do this" at 300,300 ?
> Once Bugzilla is back online, I'd suggest adding it as a feature request
> (if it's not already there).
> Ken Ray
Hello Ken,

we had a similar discussion in May this year. I have also hacked the
answer and ask dialogs and provided a version that can place the dialogs
anywhere on the screen.

Here is my post of  May 3rd "New locs for old dialogs":

"There are two  minor changes in my sample stacks
"" and
"NewLocAnswer-Revolution.rev" and its "answer dialog" substacks in


- an added script line  in the script of the "answer dialog" that resets

the loc-setting behavior to default if no "NewLoc" property is specified

before calling the dialog

- a slightly "didactically" improved surface of the sample stacks

The added script line resets the modified answer dialog to "normal"
behavior under Revolution and Metacard, i.e. if you do not specify a
NewLoc the dialog acts as you are used to it. But if you see the need to

place the answer dialog anywhere relative to the stack or on the screen,

you can do that.

It is not too difficult to modify your own answer dialog (or the ask
dialog accordingly) with the two additional script lines as shown in the

sample stacks or you could even substitute your answer dialogs with the
modified version, but be careful if you do that and backup before. But
you can also attach the modified versions as substacks to  your
applications and thus also have the option to use both the normal and
improved loc-setting feature of the answer command."


Wilhelm Sanke

More information about the Use-livecode mailing list