Hello,
Issuing a window:center method it doesn't center the window correctly. It seems to work only correct with dialogs.
Is is a bug, anyone has some work around ?
Antonio
Antonio H Ferreira
Hello,
Issuing a window:center method it doesn't center the window correctly. It seems to work only correct with dialogs.
Is is a bug, anyone has some work around ?
Antonio
ACTIVATE WINDOW oWnd ;
ON INIT oWnd:Center()I'm using build Marhc 2006. Is it ok ?
Please try it that way, thanks
Antonio,
This is not working the center() is not caculated right.
Antonio
Antonio,
I've tried it but it doesn't centers the window.
Antonio
Antonio,
Do you want to center it in the main screen, or regarding its parent window (or dialog) ?
Antonio,
I want to center it regarding its parent window.
Regards
Antonio
Hazlo asĂ:
oWnd:Center( oWndParent )
Antonio,
It doesn't work result it's the same, not centered.
Regards
#include "FiveWin.ch"
function Main()
local oWnd
DEFINE WINDOW oWnd TITLE "Center test"
ACTIVATE WINDOW oWnd ;
ON INIT BuildDlg( oWnd )
return nil
function BuildDlg( oWnd )
local oDlg
DEFINE DIALOG oDlg TITLE "Test"
ACTIVATE DIALOG oDlg ;
ON INIT oDlg:Center( oWnd )
return nil
It works with dialogs but not with mdichilds.
Antonio
#include "FiveWin.ch"
function Main()
local oWnd
DEFINE WINDOW oWnd TITLE "Center test" MDI
ACTIVATE WINDOW oWnd ;
ON INIT BuildChild( oWnd )
return nil
function BuildChild( oWnd )
local oChild
DEFINE WINDOW oChild TITLE "Test" MDICHILD
WndTop( oChild:hWnd, oWnd:nHeight / 7 )
WndLeft( oChild:hWnd, oWnd:nWidth / 10 )
return nilAntonio,
It doesn't center it. My resolution is 1400x1050.
Antonio
Antonio,
Here it is working fine on 1280x1024.
Are you running the same test ?