On Sat, Nov 17, 2012 at 3:56 PM, <Amphitryon@ok.de> wrote:
Inspired by C:\Program
Files\ooRexx\samples\oodialog\userGuide\exercises\Samples\Popups\OffsetPopups.rex
and the special feature of system menues to return the coordinates
of the cursor if the menu was clicked with the mouse, I wanted to
show a modal subdialog at the location the user selected the
system menu item. In addition I used - as recommended - ResEdit
for this child dialog.

With self~moveTo(x, y); self~ensureVisible() in method initDialog
it flickers because the dialog is shown first in the middle of the
display, for almost no time but long enough to make it observably
flicker once.

Hi Mike,

You're on the right track here, you just need to take care of a few details.

By default windows are created with the VISIBLE style.  In ResEdit, you need to set the properties for the subdialog to hidden, or not visible.  I forgot exactly which term ResEdit used.  With the visible property, the dialog is going to be first shown on the screen by the operating system.

I would also not use the ensureVisible() call.  You shouldn't need it, if you are positioning the dialog correctly.  What that method does is to move the dialog so that it is entirely on the screen.  As long as you don't position the dialog off the screen, there is no need for it.

> I tried to start the sub dialog using subdlg~execute('HIDE') and
> to bring it to the surface within initDialog() by
> self~show('SHOWTOP'). No success, even though trace shows that
> show() was the last executed statement the execute('HIDE')
> overrides it.

Make the changes I mentioned and then use the above strategy and I think you will have better results.
 

Moreover, I have set the mouse to move the pointer to the OK
button when a dialog pops up. This works for the short occurrence
of the dialog in the middle of the screen. Alas not for the
following move with moveTo(). As result the cursor jumps to the
middle of the screen but the dialog is where the system menu of
the parent dialog was.


What do you mean by set the mouse pointer to move to the OK button?  Do you mean you have done the moving in ooDialog, or do you mean you set the operating system to move the mouse pointer to the default button?

If it is the operating system setting, then that will be difficult, but not impossible to fix.  Let me know which it is.

--
Mark Miesfeld