Page 1 of 1

calculate the right position

PostPosted: Sat Nov 27, 2021 12:34 pm
by Silvio.Falconi
I saw I can create a dialog with

local nHt := Int( ScreenHeight() * 0.5 )
local nWd := Int( ScreenWidth() * 0.5 )
DEFINE DIALOG oDlgAgenti SIZE nWd, nHt PIXEL FONT oFont TRUEPIXEL ;
TITLE cTitle TRANSPARENT COLOR CLR_BLACK,RGB( 245,244,234 ) ICON oIcon

But How I can calc the exact position of each say and get control with respect to the height of the dialog created?


for a sample I made
local nHt := Int( ScreenHeight() * 0.5 )
local nWd := Int( ScreenWidth() * 0.66 )

Image

But i have a comboand get control and for now is ok if Ichange the configuration
local nHt := Int( ScreenHeight() * 0.5 )
local nWd := Int( ScreenWidth() * 0.3 )
they are no longer good


for the xbrowse I made

@ 110,10 XBROWSE oBrwAge SIZE nWd-10, nHt-10 PIXEL OF oDlgAgenti ;
DATASOURCE oAgenti COLUMNS aCols ;
AUTOSORT ;
NOBORDER CELL LINES