Center MsgXxx () in a not center (in desktop) form...
Posted: Thu Mar 24, 2022 6:11 am
Hi, I need to center the messages in the main window, so I do:
Here I assume that MsgXxx will be 200h x 400w px. and align it well, but what about short msgs ?
Is there a way to know what size the Msg window will have, to put it in the codeblock ?
Something like I do with any window: Form_xx.CenterIn ( Main ) ?
It's not something important, but it would look neater !
As always, thanks in advance for any suggestions or help.
Code: Select all
// This variables declared PRIVATE at start
cbMainCenterRow := { || ( Main.Row + ( Main.Height / 2 )) - 100 }
cbMainCenterCol := { || ( Main.Col + ( Main.Width / 2 )) - 200 }
Set DialogBox Row cbMainCenterRow Col cbMainCenterCol
END WINDOW
Main.Activate
Is there a way to know what size the Msg window will have, to put it in the codeblock ?
Something like I do with any window: Form_xx.CenterIn ( Main ) ?
It's not something important, but it would look neater !
As always, thanks in advance for any suggestions or help.