I'm having multiple windows throughout my 4gl program where I have to position to the center of the screen. For example:
OPEN WINDOW w_yesno AT 10, 10
WITH 4 ROWS, 56 COLUMNS
ATTRIBUTE (BORDER, MESSAGE LINE FIRST+1,
PROMPT LINE FIRST+2)
Is there any keyword I can use to automatically open it in the center? Something like:
OPEN WINDOW w_yesno AT CENTER
No, there isn't a keyword solution to centring windows. You can use variables for the positions and do the calculation, or you can do the calculation a priori and use hard-coded positions as you've shown. If your window size is not 24x80, calculation is perhaps better.
In the dim distant past, I wrote some code where there were a variable number of windows down the screen, some of them with 2 lines, some with 3, some with 4 lines; then you have to position them all with calculations.