by ukoenig » Thu Mar 13, 2008 5:21 pm
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 Expand view
#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]
Last edited by
ukoenig on Thu Mar 13, 2008 6:02 pm, edited 1 time in total.
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.