FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour paint xbrowse n a window
Posts: 3107
Joined: Fri Oct 07, 2005 06:28 PM
paint xbrowse n a window
Posted: Thu Mar 13, 2008 03:57 PM
How I can make to paint this xbrowse fill on the window ?




i made


 DEFINE WINDOW ::oWndMain ....



   ::nGridBottom := ::oWndMain:nBottom-::oWndMain:nTop
   ::nGridRight  : = ::oWndMain:nRight-::oWndMain:nLeft


   ::oGrid := TXBrowse():New( ::oWndMain )
   ::oGrid:nTop    := 00
   ::oGrid:nLeft   := 250
   ::oGrid:nBottom := ::nGridBottom
   ::oGrid:nRight  := ::nGridRight


[/code]
Best Regards, Saludos



Falconi Silvio
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Fit xBrowse to a Window or Dialog
Posted: Thu Mar 13, 2008 05: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

#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]
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.
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: paint xbrowse n a window
Posted: Thu Mar 13, 2008 05:30 PM

Use Move() method.

EMG

Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
paint xbrowse n a window
Posted: Thu Mar 13, 2008 05:38 PM

Look at the splitter examples in fwh\samples.

James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 3107
Joined: Fri Oct 07, 2005 06:28 PM
paint xbrowse n a window
Posted: Fri Mar 14, 2008 12:29 AM

Dear ukoenig
have you a sample in a window please?

Best Regards, Saludos



Falconi Silvio
Posts: 824
Joined: Thu Oct 13, 2005 07:39 AM
paint xbrowse n a window
Posted: Fri Mar 14, 2008 08:23 AM
Hi Silvio,

you can try this

ACTIVATE WINDOW oWnd ;
     ON RESIZE ( oSplit:AdjControl () ) ;
     ON INIT Eval( oWnd:bResized )
kind regards

Stefan
Posts: 3107
Joined: Fri Oct 07, 2005 06:28 PM
paint xbrowse n a window
Posted: Fri Mar 14, 2008 08:43 AM

Stephan,
The problem is Xbrowse I cannot move this object to height and width of the window

the splitter is ok !!

Best Regards, Saludos



Falconi Silvio
Posts: 3107
Joined: Fri Oct 07, 2005 06:28 PM
paint xbrowse n a window
Posted: Fri Mar 14, 2008 08:51 AM

this made error :

include "FiveWin.ch"

function Main()

local oWnd
Local aClient := GetClientRect (oWnd:hWnd )
nBottom = aClient[3] - 1
nRight = aClient[4]

DEFINE WINDOW oWnd ;
TITLE "Xbrowse into a window"

       oWnd:SetColor( CLR_WHITE, GetSysColor(15)-RGB(30,30,30) )


  // xvtaskbar

// ...

   // Xbrowse

USE CUSTOMER ALIAS CU

oGrid := TXBrowse():New( oWnd )
oGrid:nTop := 00
oGrid:nLeft := 242
oGrid:nBottom := nbottom
oGrid:nRight := nRight

ACTIVATE WINDOW oWnd

return nil

Best Regards, Saludos



Falconi Silvio

Continue the discussion