FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour Radio y Brush
Posts: 593
Joined: Sat May 12, 2007 11:47 AM
Radio y Brush
Posted: Sun Apr 21, 2013 10:55 PM
Buenas tardes,

Tengo un dialog al que le cambio el fondo (brush) durante la ejecuci贸n de la aplicaci贸n.

Con los say no tengo problema porque hago oSay:setbrush(oBrush1).

El problema lo tengo con un RadioButton al cual no se le puede hacer oRadio:setbrush(oBrush1) porque da error.

M谩s abajo una captura de pantalla en la que se ve lo antes expuesto.

Mi consulta es: 驴Se puede hacer que el Radio tome el brush del dialog que fue cambiado durante la ejecuci贸n de la aplicaci贸n?.

Gracias.

Rolando :-)



Uploaded with ImageShack.us
Posts: 1789
Joined: Tue Oct 11, 2005 05:01 PM
Re: Radio y Brush
Posted: Sun Apr 21, 2013 11:14 PM

oRadio:aItems[1]:Refresh()

Salu2

Carlos Vargas

Desde Managua, Nicaragua (CA)
Posts: 593
Joined: Sat May 12, 2007 11:47 AM
Re: Radio y Brush
Posted: Sun Apr 21, 2013 11:41 PM

Carlos,

Gracias por responder.

Lo que me indicas no hace ninguna diferencia, sigue saliendo el brush anterior (ya hab铆a probado con el refresh()).

Lo que s铆 me falt贸 indicar es que uso el radio desde recursos en una DLL.

驴Otra idea?. Gracias.

Rolando :D

Posts: 8515
Joined: Tue Dec 20, 2005 07:36 PM
Re: Radio y Brush
Posted: Mon Apr 22, 2013 01:53 PM
// Intenta asi,


STATIC nOpcaoRadio := 1 //-> Op鈥∶唎 do Radio da Pesquisa

Code (fw): Select all Collapse
FUNCTION AGENDTEL( DeOndeVem )

   LOCAL oBrush

   //DEFINE BRUSH oBrush  COLOR 14671839  // gris claro
   //DEFINE BRUSH oBrush  COLOR nRGB(224, 255, 255)
   DEFINE BRUSH oBrush    RESOURCE "LOGO2" //-> ARCHIVO.RES(LOGO.BMP)

   DEFINE DIALOG oDlg RESOURCE "DLG_AGENDA_TELEFONICA"                 ;
          TITLE cTitleDial + " :: Hoje:  " + DTOC( Date() )            ;
          BRUSH oBrush TRANSPARENT

   oDlg:lHelpIcon := .F.

   REDEFINE RADIO oRadMenu VAR nOpcaoRadio  ID 201, 202, 203, 204 OF oDlg ;
            ON CHANGE( TROCA_INDICE( nOpcaoRadio, cAlias, oLbx ),      ;
                       oLbx:GoTop(), oLbx:Refresh(), oLbx:SetFocus() )


Jo茫o Santos - S茫o Paulo - Brasil - Phone: +55(11)95150-7341
Posts: 593
Joined: Sat May 12, 2007 11:47 AM
Re: Radio y Brush
Posted: Mon Apr 22, 2013 04:29 PM

Karinha,

Gracias por responder, pero no tengo problema con el uso del radio, el problema es que cambio el brush del dialog durante la ejecuci贸n de la aplicaci贸n y el radio sigue tomando el brush anterior del dialog.

Rolando :D

Posts: 8515
Joined: Tue Dec 20, 2005 07:36 PM
Re: Radio y Brush
Posted: Mon Apr 22, 2013 05:08 PM

Com est谩s haciendo? Muestra el c贸digo fuente.

salu2

Jo茫o Santos - S茫o Paulo - Brasil - Phone: +55(11)95150-7341
Posts: 593
Joined: Sat May 12, 2007 11:47 AM
Re: Radio y Brush
Posted: Mon Apr 22, 2013 10:38 PM
El c贸digo simplificado que uso es as铆:

Code (fw): Select all Collapse
define dialog oDlg resource "edito_reparaciones" of oWnd;
聽 聽 聽 聽 聽 聽 聽 聽 聽 brush (if(lReciclado,oBrush10,oBrush20)) transparent
聽 聽 聽 聽 聽 聽 聽 聽 聽 
聽 聽 聽 聽 聽 聽 聽 聽 聽 
redefine buttonbmp oBtnReciclado ;聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 // deshacer cambios en los get
聽 聽 聽 聽 聽 聽 id 4088 OF oDlg ;
聽 聽 聽 聽 聽 聽 action ( ModificoScrap(@lReciclado,aDatosScrap,@cStatusScrap),;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 (cTrabajos)->RECICLADO:=(if(lReciclado,.t.,.f.)) ,;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 (cTrabajos)->STATUS:=(if(lReciclado,"A SCRAP",cStatusScrap)) ,;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 cStatus:=(if(lReciclado,"A SCRAP",cStatusScrap)), oStatus:refresh() ) ,; 
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 ( if(!lReciclado,;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 (oDlg:cTitle:=cTitulo, oBtnReciclado:loadBitmap("RECICLAR_R_CHICO") ,;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽oBtnReciclado:cTooltip:="Ingresar Artefacto para SCRAP" ,;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽oDlg:setbrush(oBrush20),;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽aeval(aSay,{|o| o:setbrush( oBrush20 )} ),; 
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽msgsound(cCarpetaInstalacion+"\Sonidos\ding.wav"),;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽lReciclado:=.f., CambioReciclado(cTrabajos,.f.)),; 
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽(oDlg:cTitle:=cTitulo1, ;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽oBtnReciclado:cTooltip:="Sacar artefacto de lista SCRAP",;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽oDlg:SetBrush( oBrush10 ),;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽aeval(aSay,{|o| o:setbrush( oBrush10 )} ),;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽oBtnReciclado:loadbitmap("RECICLAR_V_CHICO"), ;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽msgsound(cCarpetaInstalacion+"\Sonidos\Reciclaje.wav"),;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽lReciclado:=.t., CambioReciclado(cTrabajos,.t.)) ) ,;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽oBtnReciclado:refresh() 聽) ; 
聽 聽 聽 聽 聽 聽 聽 聽 update ;
聽 聽 聽 聽 聽 聽 聽 聽 bitmap if(lReciclado,"RECICLAR_R_CHICO","RECICLAR_V_CHICO")聽 聽 聽 聽 聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽 聽 
聽 聽 聽 聽 聽 聽 聽 聽 
redefine radio oRadioGtia var nOpt id 4061,4062,4070聽 聽 of oDlg ;聽 聽聽 聽 聽 聽 聽 聽 聽 聽 
聽聽 聽 聽 聽message 'Garant铆a Dealer, Cliente o Extendida' ;
聽聽 聽聽 聽 聽 on change (if.....,,)


activate dialog oDlg center nowait on init (....) valid (...., .t.)


Como puede verse, el "oBtnReciclado" es el que hace que cambie el brush con "oDlg:setbrush()" y para los say utilizo el "aeval(aSay,{|o| o:setbrush( oBrush10 )} )".

Pero no encuentro la forma de cambiarle el brush al radio durante la ejecuci贸n de la aplicaci贸n, esa es la cuesti贸n.

Rolando :-)
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Radio y Brush
Posted: Tue Apr 23, 2013 04:36 AM

Rolando,

Prueba con:

AEval( oRadMenu:aItems, { | oRadio | oRadio:SetBrush( oBrush ) } )

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 593
Joined: Sat May 12, 2007 11:47 AM
Re: Radio y Brush
Posted: Tue Apr 23, 2013 02:31 PM

Antonio,

Gracias por responder.

Lo que me indicas funcion贸 correctamente. De nuevo, Gracias.

Rolando :D

Continue the discussion