Location of dialog box
jhurley0305 at sbcglobal.net
Fri Nov 18 09:36:20 EST 2011
Ken and Malte,
Thanks for the suggestions.
Malte--Your suggestion works well. Thanks. As you say it is a bit of a hack.
Ken--I was referring to the stack that opens in response to the RR "Answer" command. Is it possible to set a preopencard handler in that stack?
But using a modal stack as you suggest, I can roll my own "answer" dialogue. This would give me more flexibility. I assume many others take this route.
> On Nov 17, 2011, at 10:05 AM, James Hurley wrote:
> Can one set the location of the popup dialog box? In my application, it obscures the object it is addressing.
> Jim, the only way to set the locaton of a modal dialog box (that I'm aware of) is changing the location in the preOpenStack of the dialog stack you're opening:
> -- Dialog stack "MyDialog"
> on preOpenCard
> set the loc of this stack to 100,100
> end preOpenCard
> -- Calling stack
> on mouseUp
> modal "MyDialog"
> end mouseUp
> The other possibility is to open a dialog box as modeless, which would let you drag it around…
> Ken Ray
> Sons of Thunder Software, Inc.
> kray at sonsothunder.com
> Web Site:
>> Malte Brill wrote:
>> Hi Jim,
>> yes, you can, but it is sort of a hack. You will need to handle the suspendStack message at stack script level:
>> on suspendStack
>> if "answer dialog" is among the lines of the openStacks then
>> set the topLeft of stack "answer dialog" to 0,0
>> end if
>> end suspendStack
More information about the Use-livecode