Hello,
You have to get Top, Bottom, Left, Right of the child or any dialog.
The browser must have the same.
Top, Left of the browser is allways 0 ( belongs to the Dialog ).
Right and Bottom has to be calculated.
Here is the source
Code: Select all
#include "fivewin.ch"
#include "xbrowse.ch"
// ----------------------------------------------
FUNCTION TEST()
LOCAL oDlg
LOCAL aCORS := {}
USE CUSTOMER NEW ALIAS CUST
DEFINE DIALOG oDlg FROM 5, 5 TO 20, 100 TITLE "A Dialog Box"
ACTIVATE DIALOG oDlg CENTERED ;
ON INIT ( aCORS := GetCoors( oDlg:hWnd ), MakeBrowse( oDlg ) )
RETURN( NIL )
//----------------------------------------------------------------------------//
STATIC FUNCTION MakeBrowse( oDlg )
LOCAL oBrw
aCORS := GetCoors( oDlg:hWnd )
oBrw := TXBrowse():new( oDlg )
WITH OBJECT oBrw
:nTop := 0
:nLeft := 0
:nBottom := aCORS [3]
:nRight := aCORS [4]
:cAlias := "CUST"
:SetRDD()
END
oBrw:CreateFromCode()
RETURN ( oBrw )
That should work.
Regards
Uwe
[/code]