Many thanks, Bill and to Dennis & Stephen.
Apologies for the long delay in acknowledging your help.
I wanted a simple pause on screen, not in a form, and had expected the omission
of one or other co-ordinate would produce a central position adjust for the
other co-ordinate by the value of the variable I was using.
It’s not so accurate by trial and error but I can get it to a good enough
visible “centre”.
Thanks again,
Regards, Alastair.
From: Bill Downall
Sent: Thursday, April 03, 2014 4:48 PM
To: RBASE-L Mailing List
Subject: [RBASE-L] - RE: Pause positioning query
If precision placement is important to you, you can create a variable form
(that looks a lot like a pause command), and set a variable for it to display
as the message. Some more tools you can use:
-- CVAL('SCREENSIZE') for your total screen dimensions width, height
set var vScreenSize = (cval('screensize'))
set var vScreenWidth = (ssub(.vScreenSize,1))
SET VAR vScreenHeight = (SSUB(.vScreenSize,2))
-- for your underlying form/dialog/process control console:
GETPROPERTY RBASE_FORM LEFT 'varFormLeft'
GETPROPERTY RBASE_FORM TOP 'varFormTop'
GETPROPERTY RBASE_FORM HEIGHT 'varFormHeight'
GETPROPERTY RBASE_FORM WIDTH 'varFormWidth'
-- for your faux PAUSE form:
PROPERTY RBASE_FORM LEFT 'varCalcedPauseLeft'
PROPERTY RBASE_FORM TOP 'varCalcedPauseTop'
PROPERTY RBASE_FORM HEIGHT 'varCalcedPauseHeight'
PROPERTY RBASE_FORM WIDTH 'varCalcedPauseWidth'
On Thu, Apr 3, 2014 at 11:24 AM, Stephen Markson <[email protected]> wrote:
Alistair, Dennis,
I don’t know if the issue is about centring (Canajun spelling) on the screen
or a form. Absent the TOP and LEFT OPTIONs, R:Base centres the PAUSE on the
screen. If you use TOP by itself without the LEFT option (or LEFT by itself
without the TOP option), you would want the PAUSE centred on the other axis.
However, this does not happen. Could be a bug.
Regards,
Stephen Markson
The Pharmacy Examining Board of Canada
416.979.2431 x251
From: [email protected] [mailto:[email protected]] On Behalf Of Dennis McGrath
Sent: April-03-14 11:11 AM
To: RBASE-L Mailing List
Subject: [RBASE-L] - RE: Pause positioning query
Centering pause commands on a particular form can be an exercise in futility
because you can’t know the exact height and width of the pause popup beforehand.
I’ve gone to doing the following approximation:
1. Use the form TOP, LEFT, WIDTH and HEIGHT to calculate the center of
the form.
2. Subtract a reasonable amount from that to calculate the top left of
the popup.
When centering on a particular control it gets lots more complicated..
Basically you have to use the properties of all the containers, starting with
the form and it’s client area and drill down to find the exact screen location
for the control.
It’s lots of detail work to be avoided unless it is absolutely critical.
Dennis McGrath
Software Developer
QMI Security Solutions
1661 Glenlake Ave
Itasca IL 60143
630-980-8461
[email protected]
From: [email protected] [mailto:[email protected]] On Behalf Of Alastair Burr
Sent: Thursday, April 03, 2014 4:24 AM
To: RBASE-L Mailing List
Subject: [RBASE-L] - Pause positioning query
Some time ago I set up some variables to use in the pause command so that I
could position the display in regular places as well as simply the default of
central.
As far as I know, top right, top left, bottom right and bottom left work fine.
What I want now is top (and bottom) central but I can’t find a way to make it
work. And, presumably, for left and right central I would simply reverse the
co-ordinates with appropriate adjustments.
Looking at what I originally set up in my variables I left out whichever one
was the central parameter, eg: for vPos_Top_Left I use | TOP 10 | LEFT 10 and
for vPos_Top_Centre I thought | TOP 10 | would work.
I do realise that I can position the display “manually” by trial and error
with the correct number of pixels from the left but is there a way to let
R:Base do the central positioning automatically?
Any guidance gratefully appreciated.
Regards,
Alastair.