Como le cambio el fondo por un color especifico a WvtDialog
WITH OBJECT ::oCrt := WvtDialog():New( 30, 90, "My Dialog Two" )
:nTooltipWidth := 300
:nTooltipTextColor := RGB( 255,0,0 )
:Create()
ENDWITH

Moderador: Moderadores
WITH OBJECT ::oCrt := WvtDialog():New( 30, 90, "My Dialog Two" )
:nTooltipWidth := 300
:nTooltipTextColor := RGB( 255,0,0 )
:Create()
ENDWITH
Ruben Dario escreveu:Estoy aumentado y Botton para grabar. Le estoy asignanco la letra G.
el problema que tengo cuando se le da grabar captura la letra G en el GET como controlo que no le captura y ejecute el botton.
#include "inkey.ch"
PROCEDURE Main
LOCAL a := 10, b := 10, c := 10, d := 10, GetList := {}
LOCAL cmdWrite, cmdCancel
SetMode( 40, 100 )
SetColor( "W/B" )
CLS
cmdWrite := wvgPushButton():New()
WITH OBJECT cmdWrite
:Caption := "Gravar"
:Activate := BlockKeyboard( K_CTRL_W )
:PointerFocus := .F.
:Create( ,, { -1, -1 }, { -3, -6 } )
ENDWITH
cmdCancel := wvgPushButton():New()
WITH OBJECT cmdCancel
:Caption := "Cancelar"
:Activate := BlockKeyboard( K_ESC )
:PointerFocus := .F.
:Create( ,, { -1, -7 }, { -3, -6 } )
ENDWITH
DO WHILE .T.
@ 5, 1 SAY "Any 1:" GET a
@ 7, 1 SAY "Any 2:" GET b
@ 9, 1 SAY "Any 3:" GET c
@ 11, 1 SAY "Any 4:" GET d
READ
DO CASE
CASE LastKey() == K_ESC
@ 15, 1 SAY "END " COLOR "N/W"
Inkey(5)
EXIT
CASE LastKey() == K_CTRL_W
@ 15, 1 SAY "WRITE" COLOR "N/W"
Inkey(5)
@ 15, 1
ENDCASE
ENDDO
RETURN
FUNCTION BlockKeyboard( nKey )
RETURN { || hb_KeyPut( nKey ) }
Asi uso WvtDialog()
WITH OBJECT ::oCrt := WvtDialog():New(kb1, kb2, ::cSistema, "Courier New", )
:nTooltipWidth := 300
:nTooltipTextColor := RGB( 16, 16, 16 ) //RGB( 255,0,0 )
:Create()
ENDWITH
Asi uso WvgCrt()
WITH OBJECT ::oCrt := WvgCrt():New(,, { ka1,ka2 }, { kb1,kb2 },, .t. )
:lModal := .T.
:fontName := "Courier"
:fontHeight := 13
:fontWidth := 0
:Title := ::cSistema
:icon := 'icojpa.Ico'
:ReSizable := .F.
:Closable := .F.
:create()
ENDWITH
CLS
METHOD lsalir() CLASS TApp01
::aContl[1] := 0 ; ::aContl[2] := 0
::CTLFIN := 1
::GUIDestroy()
::oCrt:Destroy()
alert("Salida ")
::CLOSE()
RETURN self
METHOD FORM_CAPT(ME1,ME2,ME3,ME4,ME5,ME6,opr,cnt,a1,a2,b1,b2,o1,o2,p1,p2) CLASS TApp01
WITH OBJECT ::oCrt := WvtDialog():New(kb1, kb2, ::cSistema, "Courier New", )
:nTooltipWidth := 300
:nTooltipTextColor := RGB( 16, 16, 16 )
:Create()
ENDWITH
RETURN self
METHOD lsalir() CLASS TApp01
::aContl[1] := 0 ; ::aContl[2] := 0
::CTLFIN := 1
::GUIDestroy()
::oCrt:Destroy()
alert("Salida ")
::CLOSE()
RETURN self
#include "inkey.ch"
PROCEDURE Main
hb_ThreadStart( { || Test1() } )
hb_ThreadStart( { || Test1() } )
hb_ThreadStart( { || Test1() } )
hb_ThreadStart( { || Test1() } )
hb_ThreadWaitForAll()
RETURN
FUNCTION Test1()
hb_gtReload( "WVG")
SetMode( 25, 80 )
CLS
? "This is a Thread"
Inkey(0)
RETURN NIL
PROCEDURE HB_GTSYS
REQUEST HB_GT_WVG_DEFAULT
RETURN
oXbp := WvgPushButton():new( oStatic2 )
oXbp:caption := "Aplicar"
oXbp:create( , , { 830, 520 }, { 60, 25 } )
oXbp:activate := {|| CALCULOS(cVarA,cVarB,cVarC,cR1,cR2,cR3,cR4) , oCrt:sendMessage( WM_SIZE, 0, 0 ) }
oRadio := WvgRadioButton():new( oStatic2, , { 10, 10 }, { 130, 15 } )
oRadio:caption := "Sequência Fibonacci"
oRadio:selection := .T.
oRadio:selected := {| cR1, obj | cR1 := cR1, Wvg_MessageBox( , obj:caption + iif( obj:selection, "< S >", "< N >" ) ) }
oRadio:create()
// Create first SLE, specify position using :create()
// On :typeOut set the focus to the second SLE
oXbp := WvgSLE():new()
oXbp:autoTab := .T.
oXbp:bufferLength := 15
// Data code block containing assignment to LOCAL variable
oXbp:dataLink := {| x | iif( x == NIL, cVarA, cVarA := x ) }
oXbp:create( oStatic2, , { 10, 170 }, { 150, 20 } )
oXbp:setData()
// Assign the value of the edit buffer to a LOCAL variable when the input focus is lost
oXbp:killInputFocus := {| x, y, oSLE | x := x, y := y, oSLE:getData(), oPanel:caption := "cVarA =" + cVarA }
FUNCTION CONFIGURA()
********* colocar say e get para atualizar um arquivo de parametros -> campos para personalizar diretorios(pastas)
******** não consigo usar SAY E nem GET
RETURN NIL
STATIC FUNCTION CALCULOS() // função após usar o botão APLICAR
*** ao escolher radiobutton e aplicar faria uns calculos aqui, criando os arquivos textos de depois
*** queria atualizar o memoread(), pois seria um arquivo com os cálculos
*** Se botão for 1, fazer alguns calculos e memoread("1.JRC")
*** SE botão for 2, fazer alguns calculos e memoread("2.JRC")
*** não consigo passar a variável, nem o radiobutton,
RETURN NIL
FUNCTION CONFIGURA(oCrt)
Local a1 := 7
Local a2 :=12
Local b1 := 33
Local b2 := 119
Local oCrt1
local GetList := {}
SetMode( 33,100)
oCrt1 := WvgCrt():New(,, { a1,a2 }, { b1,b2 },, .t. )
oCrt1:Title := "Parametros"
oCrt1:ReSizable := .T. // redimensionar
oCrt1:Closable := .T.
oCrt1:create()
@ 0,0 get a1
read
oCrt1:destroy()
RETURN oCrt
Usuários vendo este fórum: Nenhum usuário registrado online e 6 visitantes