Hola.
Necesito hacer un window y que este dividida en 2 partes la de arriba tiene que tener un say y un get y abajo un xbrowse
Intente con opanel pero no consigo lo del say y el get.
lo unico que me salio es poner un group arriba (oPanel:oTop= ogrupo) y abajo el xbrowse.
Alguna Ayuda?
gracias.
como hago esto: window get say
- goosfancito
- Posts: 1955
- Joined: Fri Oct 07, 2005 7:08 pm
- FranciscoA
- Posts: 2163
- Joined: Fri Jul 18, 2008 1:24 am
- Location: Chinandega, Nicaragua, C.A.
Re: como hago esto: window get say
Hola Gosfancito, este pequeño codigo puede servirte de partida.
(Yo aun no uso la TPANEL)
//----------------------------//
Function Prueba()
local oChild, oBrw, oRect
local dFechemis := cTod(" / / "), oFechemis
DEFINE WINDOW oChild MDICHILD OF oWnd TITLE "Prueba"
oRect:=TPanel():New( 0, 0, 130, oChild:nWidth, oChild )
oRect:bPainted:={|| oRect:nWidth := oChild:nWidth ,;
oRect:Say( 1, 10, "Fecha de Emision:" ) }
@1, 40 GET oFechemis VAR dFechemis OF oRect SIZE 90,18
oBrw := TXBrowse():New( oChild )
oBrw:CreateFromCode()
ACTIVATE WINDOW oChild MAXIMIZED;
ON INIT ( oFechemis:SetFocus(),;
oBrw:nHeight := oChild:nHeight-163, oBrw:nWidth := oChild:nWidth-12, oBrw:nTop:=130 )
RETURN NIL
Saludos.
(Yo aun no uso la TPANEL)
//----------------------------//
Function Prueba()
local oChild, oBrw, oRect
local dFechemis := cTod(" / / "), oFechemis
DEFINE WINDOW oChild MDICHILD OF oWnd TITLE "Prueba"
oRect:=TPanel():New( 0, 0, 130, oChild:nWidth, oChild )
oRect:bPainted:={|| oRect:nWidth := oChild:nWidth ,;
oRect:Say( 1, 10, "Fecha de Emision:" ) }
@1, 40 GET oFechemis VAR dFechemis OF oRect SIZE 90,18
oBrw := TXBrowse():New( oChild )
oBrw:CreateFromCode()
ACTIVATE WINDOW oChild MAXIMIZED;
ON INIT ( oFechemis:SetFocus(),;
oBrw:nHeight := oChild:nHeight-163, oBrw:nWidth := oChild:nWidth-12, oBrw:nTop:=130 )
RETURN NIL
Saludos.
Francisco J. Alegría P.
Chinandega, Nicaragua.
Fwxh-MySql-TMySql
Chinandega, Nicaragua.
Fwxh-MySql-TMySql
- goosfancito
- Posts: 1955
- Joined: Fri Oct 07, 2005 7:08 pm
Re: como hago esto: window get say
y si no es con tpanel,
de que otra forma puedo realizarlo?
a ver los tpanel son como los contendores usados en gtk?
de que otra forma puedo realizarlo?
a ver los tpanel son como los contendores usados en gtk?
- FranciscoA
- Posts: 2163
- Joined: Fri Jul 18, 2008 1:24 am
- Location: Chinandega, Nicaragua, C.A.
Re: como hago esto: window get say
¿Algo asi, es lo que quieres hacer?
http://imageshack.us/photo/my-images/546/dibujofu.png/
Lo hice utilizando una pequeñisima classe, basada en TRect.
Saludos.
http://imageshack.us/photo/my-images/546/dibujofu.png/
Lo hice utilizando una pequeñisima classe, basada en TRect.
Saludos.
Francisco J. Alegría P.
Chinandega, Nicaragua.
Fwxh-MySql-TMySql
Chinandega, Nicaragua.
Fwxh-MySql-TMySql
- goosfancito
- Posts: 1955
- Joined: Fri Oct 07, 2005 7:08 pm
- FranciscoA
- Posts: 2163
- Joined: Fri Jul 18, 2008 1:24 am
- Location: Chinandega, Nicaragua, C.A.
Re: como hago esto: window get say
Goosfancito, aquí tienes un ejemplo probado: (Entorno MDI)
//----------------------------//
Function Prueba()
local oChild, oBrw, oFont1, oBotModi
local dFechemis := cTod(" / / "), oFechemis
Local oConceptG, cConceptG:="ESTO ES UNA PRUEBA"
LOCAL oRect, oRectClr1, oRectClr2, nRectClrTxt1,nRectClrTxt2
oRectClr1:= 12961221
oRectClr2:= 16777215
nRectClrTxt1:=0
nRectClrTxt2:=0
DEFINE FONT oFont1 NAME "LUCIDA SANS TYPEWRITER" SIZE 6, -13
DEFINE WINDOW oChild MDICHILD OF oWnd TITLE "Prueba"
oRect:=TRectang():New( 0, 0, 130, oChild:nWidth, oChild ,, oRectClr1,oRectClr2, )
oRect:bPainted:={|| oRect:nWidth := oChild:nWidth ,;
oRect:Say( 15, 48, "Fecha de Emision:", nRectClrTxt1, nRectClrTxt2, oRect:oWnd:oFont, .T., .T.,) ,;
oRect:Say( 40, 48, "Concepto General:", nRectClrTxt1, nRectClrTxt2, oRect:oWnd:oFont, .T., .T.,) }
@1.0, 28 GET oFechemis VAR dFechemis OF oRect SIZE 90,18 FONT oWnd:oFont
@2.7, 28 GET oConceptG VAR cConceptG OF oRect SIZE 550,68 MULTILINE NO VSCROL FONT oFont1
@70,30 BTNBMP oBotModi LEFT 2007 PROMPT "Modificar" SIZE 100,28 OF oRect ACTION MsgInfo("Hola")
oBotModi:cTooltip := "Modificar el documento"
oBrw := TXBrowse():New( oChild )
oBrw:CreateFromCode()
ACTIVATE WINDOW oChild MAXIMIZED;
ON INIT ( oFechemis:SetFocus(),;
oBrw:nHeight := oChild:nHeight-163, oBrw:nWidth := oChild:nWidth-12, oBrw:nTop:=130 )
oFont1:End()
RETURN NIL
Y ésta es la Classe:
#include "FiveWin.ch"
#define COLOR_BTNFACE 15
#ifdef __XPP__
#define Super ::TControl
#endif
// Francisco J. Alegría P., Sept 10/2008
//----------------------------------------------------------------------------//
CLASS TRectang FROM TControl
DATA l3D
DATA nRGB1, nRGB2
CLASSDATA lRegistered AS LOGICAL
METHOD New( nRow, nCol, nHeight, nWidth, oWnd, l3D, nRGB1, nRGB2, oFont ) CONSTRUCTOR
METHOD Display() INLINE ::BeginPaint(), ::Paint(), ::EndPaint(), 0
METHOD Paint()
ENDCLASS
//----------------------------------------------------------------------------//
METHOD New( nRow, nCol, nHeight, nWidth, oWnd, l3D, nRGB1, nRGB2, oFont ) CLASS TRectang
local oRect := oWnd:GetCliRect()
DEFAULT nWidth:=100, nHeight:=oWnd:nHeight, l3D := .f.,;
nRGB1:=NIL, nRGB2:=NIL, oFont:= NIL
::nStyle = nOR( WS_CHILD, WS_VISIBLE, WS_CLIPCHILDREN )
::oWnd = oWnd
::nTop = nRow
::nLeft = nCol
::nBottom = nHeight
::nRight = nWidth
::l3D = l3D
::nClrPane = If( l3D, GetSysColor( COLOR_BTNFACE ), CLR_GRAY )
::nRGB1 = nRGB1
::nRGB2 = nRGB2
::oFont = oFont
#ifdef __XPP__
DEFAULT ::lRegistered := .f.
#endif
::SetColor( ::nClrText, ::nClrPane )
::Register( nOR( CS_VREDRAW, CS_HREDRAW ) )
::Create()
return Self
//----------------------------------------------------------------------------//
METHOD Paint() CLASS TRectang
local aInfo := ::DispBegin(), oFont
//colores personalizados degradados
Gradient( ::hDC, { 0, 0, ::nHeight, ::nWidth },;
::nRGB1, ::nRGB2, .T. )
if ::oFont == nil
DEFINE FONT oFont NAME "Tahoma" SIZE 0, -12 BOLD
endif
::oWnd:SetFont( oFont )
if ::bPainted != nil
Eval( ::bPainted, ::hDC )
endif
::oWnd:oFont:End()
::DispEnd( aInfo )
return nil
Espero sea de alguna utilidad.
Saludos
//----------------------------//
Function Prueba()
local oChild, oBrw, oFont1, oBotModi
local dFechemis := cTod(" / / "), oFechemis
Local oConceptG, cConceptG:="ESTO ES UNA PRUEBA"
LOCAL oRect, oRectClr1, oRectClr2, nRectClrTxt1,nRectClrTxt2
oRectClr1:= 12961221
oRectClr2:= 16777215
nRectClrTxt1:=0
nRectClrTxt2:=0
DEFINE FONT oFont1 NAME "LUCIDA SANS TYPEWRITER" SIZE 6, -13
DEFINE WINDOW oChild MDICHILD OF oWnd TITLE "Prueba"
oRect:=TRectang():New( 0, 0, 130, oChild:nWidth, oChild ,, oRectClr1,oRectClr2, )
oRect:bPainted:={|| oRect:nWidth := oChild:nWidth ,;
oRect:Say( 15, 48, "Fecha de Emision:", nRectClrTxt1, nRectClrTxt2, oRect:oWnd:oFont, .T., .T.,) ,;
oRect:Say( 40, 48, "Concepto General:", nRectClrTxt1, nRectClrTxt2, oRect:oWnd:oFont, .T., .T.,) }
@1.0, 28 GET oFechemis VAR dFechemis OF oRect SIZE 90,18 FONT oWnd:oFont
@2.7, 28 GET oConceptG VAR cConceptG OF oRect SIZE 550,68 MULTILINE NO VSCROL FONT oFont1
@70,30 BTNBMP oBotModi LEFT 2007 PROMPT "Modificar" SIZE 100,28 OF oRect ACTION MsgInfo("Hola")
oBotModi:cTooltip := "Modificar el documento"
oBrw := TXBrowse():New( oChild )
oBrw:CreateFromCode()
ACTIVATE WINDOW oChild MAXIMIZED;
ON INIT ( oFechemis:SetFocus(),;
oBrw:nHeight := oChild:nHeight-163, oBrw:nWidth := oChild:nWidth-12, oBrw:nTop:=130 )
oFont1:End()
RETURN NIL
Y ésta es la Classe:
#include "FiveWin.ch"
#define COLOR_BTNFACE 15
#ifdef __XPP__
#define Super ::TControl
#endif
// Francisco J. Alegría P., Sept 10/2008
//----------------------------------------------------------------------------//
CLASS TRectang FROM TControl
DATA l3D
DATA nRGB1, nRGB2
CLASSDATA lRegistered AS LOGICAL
METHOD New( nRow, nCol, nHeight, nWidth, oWnd, l3D, nRGB1, nRGB2, oFont ) CONSTRUCTOR
METHOD Display() INLINE ::BeginPaint(), ::Paint(), ::EndPaint(), 0
METHOD Paint()
ENDCLASS
//----------------------------------------------------------------------------//
METHOD New( nRow, nCol, nHeight, nWidth, oWnd, l3D, nRGB1, nRGB2, oFont ) CLASS TRectang
local oRect := oWnd:GetCliRect()
DEFAULT nWidth:=100, nHeight:=oWnd:nHeight, l3D := .f.,;
nRGB1:=NIL, nRGB2:=NIL, oFont:= NIL
::nStyle = nOR( WS_CHILD, WS_VISIBLE, WS_CLIPCHILDREN )
::oWnd = oWnd
::nTop = nRow
::nLeft = nCol
::nBottom = nHeight
::nRight = nWidth
::l3D = l3D
::nClrPane = If( l3D, GetSysColor( COLOR_BTNFACE ), CLR_GRAY )
::nRGB1 = nRGB1
::nRGB2 = nRGB2
::oFont = oFont
#ifdef __XPP__
DEFAULT ::lRegistered := .f.
#endif
::SetColor( ::nClrText, ::nClrPane )
::Register( nOR( CS_VREDRAW, CS_HREDRAW ) )
::Create()
return Self
//----------------------------------------------------------------------------//
METHOD Paint() CLASS TRectang
local aInfo := ::DispBegin(), oFont
//colores personalizados degradados
Gradient( ::hDC, { 0, 0, ::nHeight, ::nWidth },;
::nRGB1, ::nRGB2, .T. )
if ::oFont == nil
DEFINE FONT oFont NAME "Tahoma" SIZE 0, -12 BOLD
endif
::oWnd:SetFont( oFont )
if ::bPainted != nil
Eval( ::bPainted, ::hDC )
endif
::oWnd:oFont:End()
::DispEnd( aInfo )
return nil
Espero sea de alguna utilidad.
Saludos
Francisco J. Alegría P.
Chinandega, Nicaragua.
Fwxh-MySql-TMySql
Chinandega, Nicaragua.
Fwxh-MySql-TMySql
- goosfancito
- Posts: 1955
- Joined: Fri Oct 07, 2005 7:08 pm