paint xbrowse n a window

paint xbrowse n a window

Postby Silvio » Thu Mar 13, 2008 3:57 pm

How I can make to paint this xbrowse fill on the window ?

Image


i made


Code: Select all  Expand view  RUN
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
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Fit xBrowse to a Window or Dialog

Postby 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  RUN

#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 :lol:
[/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.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany


Postby James Bott » Thu Mar 13, 2008 5:38 pm

Look at the splitter examples in fwh\samples.

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Postby Silvio » Fri Mar 14, 2008 12:29 am

Dear ukoenig
have you a sample in a window please?
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Postby StefanHaupt » Fri Mar 14, 2008 8:23 am

Hi Silvio,

you can try this

Code: Select all  Expand view  RUN
ACTIVATE WINDOW oWnd ;
     ON RESIZE ( oSplit:AdjControl () ) ;
     ON INIT Eval( oWnd:bResized )
kind regards
Stefan
StefanHaupt
 
Posts: 824
Joined: Thu Oct 13, 2005 7:39 am
Location: Germany

Postby Silvio » Fri Mar 14, 2008 8: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
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Postby Silvio » Fri Mar 14, 2008 8: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
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 81 guests