window:center() doesn´t work right
window:center() doesn´t work right
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
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 Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Its working fine used this way:
Code: Select all
ACTIVATE WINDOW oWnd ;
ON INIT oWnd:Center()
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Antonio,
Please try this test:
Please try this test:
Code: Select all
#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
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Antonio,
Please try this:
Please try this:
Code: Select all
#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 nil
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact: