¿Puede funcionar en dialogos?
Estoy generando los controles sin recursos, por puro código
creswinman wrote:¿Puede funcionar en dialogos?
Estoy generando los controles sin recursos, por puro código
#include "FWCE.ch"
//----------------------------------------------------------------------------//
function Main()
local oWnd, oPanel
local cName := Space( 20 ), cAddress := Space( 30 )
DEFINE DIALOG oDlg FROM 1,1 TO 180,180 TITLE "Scroll" PIXEL
@ 1 , 1 PANEL oPanel OF oDlg SIZE oDlg:nWidth() - 26, oDlg:nHeight() - 48 PIXEL
@ 40, 1 SAY "Name:" OF oPanel SIZE 40, 15 PIXEL
@ 60, 1 GET cName OF oPanel SIZE 100, 18 PIXEL
@ 140, 1 SAY "Address:" OF oDlg SIZE 50, 15 PIXEL
@ 160, 1 GET cAddress OF oDlg SIZE 120, 18 PIXEL
ACTIVATE DIALOG oDlg
return nil
/*
METHOD DefControl( oCtrl ) CLASS TPanel
DEFAULT oCtrl:nId := oCtrl:GetNewId()
if AScan( ::oWnd:aControls, { | o | o:nId == oCtrl:nId } ) > 0
#define DUPLICATED_CONTROLID 2
Eval( ErrorBlock(), _FWGenError( DUPLICATED_CONTROLID, ;
"No: " + Str( oCtrl:nId, 6 ) ) )
else
AAdd( ::oWnd:aControls, oCtrl )
oCtrl:hWnd = 0
endif
return nil
*/
#include "FWCE.ch"
//----------------------------------------------------------------------------//
function Main()
local oWnd, oPanel
local cName := Space( 20 ), cAddress := Space( 30 )
DEFINE DIALOG oDlg FROM 1,1 TO 180,180 TITLE "Scroll" PIXEL
@ 1 , 1 PANEL oPanel OF oDlg SIZE oDlg:nWidth() - 26, oDlg:nHeight() - 48 PIXEL
@ 140, 1 SAY "Address:" OF oDlg SIZE 50, 15 PIXEL
@ 160, 1 GET cAddress OF oDlg SIZE 120, 18 PIXEL
ACTIVATE DIALOG oDlg ;
ON INIT PanelControls( oPanel )
return nil
function PanelControls( oPanel )
local cName := Space( 20 )
@ 40, 1 SAY "Name:" OF oPanel SIZE 40, 15 PIXEL
@ 60, 1 GET cName OF oPanel SIZE 100, 18 PIXEL
return nil
Antonio Linares wrote:Vikthor,
Hazlo así:
- Code: Select all Expand view
#include "FWCE.ch"
//----------------------------------------------------------------------------//
function Main()
local oWnd, oPanel
local cName := Space( 20 ), cAddress := Space( 30 )
DEFINE DIALOG oDlg FROM 1,1 TO 180,180 TITLE "Scroll" PIXEL
@ 1 , 1 PANEL oPanel OF oDlg SIZE oDlg:nWidth() - 26, oDlg:nHeight() - 48 PIXEL
@ 140, 1 SAY "Address:" OF oDlg SIZE 50, 15 PIXEL
@ 160, 1 GET cAddress OF oDlg SIZE 120, 18 PIXEL
ACTIVATE DIALOG oDlg ;
ON INIT PanelControls( oPanel )
return nil
function PanelControls( oPanel )
local cName := Space( 20 )
@ 40, 1 SAY "Name:" OF oPanel SIZE 40, 15 PIXEL
@ 60, 1 GET cName OF oPanel SIZE 100, 18 PIXEL
return nil
if ! Empty( ::oWnd:hWnd )
::Create("")
::oWnd:AddControl( Self )
DEFINE SCROLLBAR ::oVScroll VERTICAL OF Self
::oVScroll:SetRange( 0, 100 )
else
::oWnd:DefControl( Self )
DEFINE SCROLLBAR ::oVScroll VERTICAL OF Self
::oVScroll:SetRange( 0, 100 )
endif
Return to FiveWin para Pocket PC
Users browsing this forum: No registered users and 28 guests