On 30/1/01 12:01 pm, Ernst Michael Reicher at [EMAIL PROTECTED] wrote:

> Hi gurus,
> is it possible that when you open a stack in modal-mode that MC
> automatically centers it to the open stack???

Hi, Ernst. AFAIK, MC centres it to the loc of the defaultStack, providing
that the loc of the defaultStack is within the screenRect + the height of
the menubar.

> I use a selfe made list-dialog which I adapt to my needs in size and
> additional buttons
> after lock screen and toplevel it, I do the adaption
> then I make it modal (modal stack xy)
> 
> but when I also customize the loc its automatically centered or say its loc
> is set to the loc of the open stack....

How about storing the defaultStack, setting the defaultStack to the name of
the stack that is to be modal and then resetting the defaultStack:

on mouseUp
  set the loc of stack "modalStack" to 300,300
  put the defaultStack into tDefault
  set the defaultstack to "modalstack"
  modal "modalstack"
  set the defaultStack to tDefault
end mouseUp

Alternatively, you could set the loc of the stack in the preOpenStack
handler - I think preOpenStack gets sent when the stack is opened as modal
even if the stack is already open as topLevel (note though that you don't
have to topLevel the stack in the first place to do your adaptations).

on preOpenStack
  set the loc of me to 300,300
end preOpenStack

Cheers,

Alan

Alan Beattie <[EMAIL PROTECTED]> <http://www.runrev.com/>
Runtime Revolution Limited (Formerly Cross Worlds Computing)
Tel: +44 (0)131 672 2909.  Fax: +44 (0)1639 830 707.


Archives: http://www.mail-archive.com/[email protected]/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.

Reply via email to