Control of ask-dialogs position in Windows standalone

Mark Schonewille europe at ehug.info
Sun Jun 26 14:31:49 EDT 2005


Hi Kresten,

I can think of two approaches. One approach needs some editing
of the stack "Ask Dialog", the other uses a custom dialog. I'll
tell how you might edit the stack "Ask Dialog" as you probably
know how to create a custom dialog.

Edit the script of the stack "Ask Dialog". There, you will see:

on openCard
end openCard

on preOpenCard
end preOpenCard

on closeCard
end closeCard

on openStack
end openStack

Change the preOpenCard handler to the following (mind linewraps):

on preOpenCard
   if the cCustomLoc of me is a point then set the loc of me to
the cCustomLoc of me
end preOpenCard

In the script where you want to execute the ask command, now
include the following:

set the cCustomLoc of stack "Ask Dialog" to 1920,512
ask "Hello World?" with "Hello indeed!"
put it into myUserInput --or any other variable
set the cCustomLoc of stack "Ask Dialog" to empty
-- rest of script

You will need to determine the right value for cCustomLoc
yourself, although I think it can be calculated from the screenrect.

Best,

Mark



Kresten Bjerg wrote:
> I am working with large  cards, 3x3 screens, and have 5 ask-dialogs, all
> called from  primary (upper left) screenwindow. In mac versions these
> dialogs appear as they are meant to, centered in that primary window.
> But in a Windows standalone the dialogs appear - out of sight - in the
> next (middle) screen, thus not answerable-(except blindly), and blocking
> all activity. Is there a way to fix the position of such ask-dialogues
> to a specified screen-position?
> 
> Kresten Bjerg

-- 

eHUG coordinator
mailto:europe at ehug.info
http://www.ehug.info
http://home.wanadoo.nl/mark.sch
http://www.economy-x-talk.com

Please inform me about vacancies in the field of
general economics at your institute. I am also looking
for new freelance programming projects.







More information about the use-livecode mailing list