FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour Cuál es la mejor manera de cambiar el fondo de los dialogos
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: Cuál es la mejor manera de cambiar el fondo de los dialogos
Posted: Thu Jul 20, 2017 02:49 AM

Fernando
No entiendo lo que quieres decir

Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo

El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 8515
Joined: Tue Dec 20, 2005 07:36 PM
Re: Cuál es la mejor manera de cambiar el fondo de los dialogos
Posted: Thu Jul 20, 2017 12:19 PM

Masler el comando TRANSPARENT también no funciona con URLLINK. Creo sea esto. jejejejejejeje.

João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: Cuál es la mejor manera de cambiar el fondo de los dialogos
Posted: Thu Jul 20, 2017 12:47 PM
Added for next version

Urllink.ch

Code (fw): Select all Collapse
#xcommand @ <nTop>, <nLeft> URLLINK <oURL> ;
             [ <dlg: OF, WINDOW, DIALOG> <oWnd> ] ;
             [ <pixel: PIXEL> ] ;
             [ <lDesign: DESIGN> ] ;
             [ FONT <oFont> ] ;
             [ MESSAGE <cMsg> ] ;
             [ URL <cURL> ] ;
             [ TOOLTIP <cToolTip> ] ;
             [ CLRINIT <nClrInit> ] ;
             [ CLROVER <nClrOver> ] ;
             [ CLRVISIT <nClrVisit> ] ;
             [ <lTrans: TRANSPARENT>] ;
       => ;
          [ <oURL> := ] TURLLink():New( <nTop>, <nLeft>, [<oWnd>], ;
                        <.pixel.>, <.lDesign.>, <oFont>, <cMsg>, ;
                        <cURL>, <cToolTip>, <nClrInit>, <nClrOver>, ;
                        <nClrVisit>, <.lTrans.> )

#xcommand REDEFINE URLLINK [<oURL>] ;
             [ ID <nId> ] ;
             [ <dlg: OF, WINDOW, DIALOG> <oDlg> ] ;
             [ FONT <oFont> ] ;
             [ MESSAGE <cMsg> ] ;
             [ URL <cURL> ] ;
             [ TOOLTIP <cToolTip> ] ;
             [ CLRINIT <nClrInit> ] ;
             [ CLROVER <nClrOver> ] ;
             [ CLRVISIT <nClrVisit> ] ;
             [ <lTrans: TRANSPARENT>] ;
       => ;
          [ <oURL> := ] TURLLink():ReDefine( <nId>, <oDlg>, ;
                        <oFont>, <cMsg>, <cURL>, <cToolTip>, ;
                        <nClrInit>, <nClrOver>, <nClrVisit>, <.lTrans.> )



And UrlLink.prg

Code (fw): Select all Collapse
METHOD New( nTop, nLeft, oWnd, lPixel, lDesign, oFont, cMsg, cURL, ;
            cToolTip, nClrInit, nClrOver, nClrVisit, lTransp ) CLASS TURLLink

   local nClrPane

   DEFAULT nTop      := 0, nLeft := 0, ;
           oWnd      := GetWndDefault(),;
           lPixel    := .F.,;
           lDesign   := .F.,;
           oFont     := TFont():New( GetSysFont(), 0, -12,,,,,,, .T. ),;
           nClrInit  := CLR_HBLUE,;
           nClrOver  := CLR_HRED,;
           nClrVisit := CLR_MAGENTA,;
           nClrPane  := oWnd:nClrPane,;
           lTransp   := .f.

.../...
             ::lTransparent := lTransp
.../...


METHOD ReDefine( nId, oWnd, oFont, cMsg, cURL, cToolTip, nClrInit, nClrOver, ;
                 nClrVisit, lTransp ) CLASS TURLLink

   DEFAULT oWnd      := GetWndDefault(), ;
           oFont     := TFont():New( GetSysFont(), 0, -12,,,,,,, .t. ), ;
           nClrInit  := CLR_HBLUE, ;
           nClrOver  := CLR_HRED, ;
           nClrVisit := CLR_MAGENTA, ;
           lTransp   := .f.
.../...
          ::lTransparent := lTransp
.../...
Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo

El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 8515
Joined: Tue Dec 20, 2005 07:36 PM
Re: Cuál es la mejor manera de cambiar el fondo de los dialogos
Posted: Thu Jul 20, 2017 02:01 PM
Master, falta COLORS, para cambiar el COLOR del URLLINK

Code (fw): Select all Collapse
#include "FiveWin.ch"
#include "URLLink.ch"

#define COLOR_BTNFACE  15

// Added for next version -> cnavarro

// Urllink.ch

#xcommand @ <nTop>, <nLeft> URLLINK <oURL> ;
             [ <dlg: OF, WINDOW, DIALOG> <oWnd> ] ;
             [ <pixel: PIXEL> ] ;
             [ <lDesign: DESIGN> ] ;
             [ <color: COLOR,COLORS > <nClrText> [,<nClrBack> ] ] ;
             [ FONT <oFont> ] ;
             [ MESSAGE <cMsg> ] ;
             [ URL <cURL> ] ;
             [ TOOLTIP <cToolTip> ] ;
             [ CLRINIT <nClrInit> ] ;
             [ CLROVER <nClrOver> ] ;
             [ CLRVISIT <nClrVisit> ] ;
             [ <lTrans: TRANSPARENT>] ;
       => ;
          [ <oURL> := ] TURLLink():New( <nTop>, <nLeft>, [<oWnd>], ;
                        <.pixel.>, <.lDesign.>, <oFont>, <cMsg>, ;
                        <cURL>, <cToolTip>, <nClrInit>, <nClrOver>, ;
                        <nClrVisit>, <.lTrans.> )

#xcommand REDEFINE URLLINK [<oURL>] ;
             [ ID <nId> ] ;
             [ <dlg: OF, WINDOW, DIALOG> <oDlg> ] ;
             [ <color: COLOR,COLORS > <nClrText> [,<nClrBack> ] ] ;
             [ FONT <oFont> ] ;
             [ MESSAGE <cMsg> ] ;
             [ URL <cURL> ] ;
             [ TOOLTIP <cToolTip> ] ;
             [ CLRINIT <nClrInit> ] ;
             [ CLROVER <nClrOver> ] ;
             [ CLRVISIT <nClrVisit> ] ;
             [ <lTrans: TRANSPARENT>] ;
       => ;
          [ <oURL> := ] TURLLink():ReDefine( <nId>, <oDlg>, ;
                        <oFont>, <cMsg>, <cURL>, <cToolTip>, ;
                        <nClrInit>, <nClrOver>, <nClrVisit>, <.lTrans.> )

//----------------------------------------------------------------------------//

function Main()

   local nColor := GetSysColor( COLOR_BTNFACE )
   local oDlg, oFont, oFnt1, oFnt2, oBmp

   DEFINE FONT oFont NAME GetSysFont() SIZE 0, -12
   DEFINE FONT oFnt1 NAME "ARIAL" SIZE 0, -20 BOLD
   DEFINE FONT oFnt2 NAME "ARIAL" SIZE 0, -14 BOLD

   DEFINE DIALOG oDlg RESOURCE "Main" FONT oFont ;
          COLORS( nRGB( 192, 192, 192 ), nRGB( 45, 121, 147 ) )  // "GreenBlue"

       //   GRADIENT( GradDlgs( "GreenBlue" ) )

   REDEFINE BITMAP oBmp ID 301 OF oDlg RESOURCE "Fivewin"

   oBmp:cToolTip := "Logotipo de Fivewin"

   REDEFINE SAY ID 101 PROMPT "FW/FWH/FW++/FWC3" FONT oFnt1 ;
            COLOR CLR_BLACK, nColor OF oDlg

   REDEFINE SAY ID 102 PROMPT "Fivetech © 1993-2017" FONT oFnt2 ;
            COLOR CLR_MAGENTA, nColor OF oDlg

   REDEFINE SAY ID 103 ;
            PROMPT "La mejor librería para crear con CA-Clipper " + ;
                   "auténticas aplicaciones Windows. Es muy fácil " + ;
                   "de usar y los resultados son excelentes. " + ;
                   "Visite la página oficial de Fivewin:" ;
            FONT oFont OF oDlg

   REDEFINE URLLINK ID 104 URL "www.fivetechsoft.com" OF oDlg ;
            TOOLTIP "Sitio oficial de FiveTech"               ;
            COLORS CLR_BLACK, CLR_YELLOW TRANSPARENT  // No cambia el COLOR

   REDEFINE SAY ID 105 ;
            PROMPT "Fivewin para Harbour le ofrece el poder de " + ;
                   "los 32 bits. Además, ya está disponible FW " + ;
                   "para el nuevo compilador C3. " + ;
                   "Contacte con nosotros enviando un e-mail a:" ;
            FONT oFont OF oDlg

   REDEFINE URLLINK ID 106 URL "mailto:alinares@fivetechsoft.com" OF oDlg ;
            TOOLTIP "E-mail de FiveTech"               ;
            COLORS CLR_BLACK, CLR_YELLOW TRANSPARENT  // No cambia el COLOR

   REDEFINE BUTTON ID 201 ACTION ( oDlg:End() )

   oDlg:lHelpIcon := .f.

   ACTIVATE DIALOG oDlg CENTER ;
            VALID ( oFont:End(), oFnt1:End(), oFnt2:End(), .t. )

return nil

//----------------------------------------------------------------------------//
// Using:

// GradDlgs( "BlueGreen" )

//----------------------------------------------------------------------------//
// Gradient for Dialogs: Thanks to Rick Lipkin
//----------------------------------------------------------------------------//

Function GradDlgs( cTheme )

   local aGrad    := {}
   DEFAULT cTheme := ""

   if Valtype( cTheme ) == "C"
      cTheme  := Upper( cTheme )
      Do Case
         Case cTheme = Upper( "SolidWhite" )
            aGrad := { { 0.50, nRGB( 255, 255, 255 ), nRGB( 255, 255, 255 ) } }
         Case cTheme = Upper( "BlueGreen" )
            aGrad := { { 1.00, 14671839, 7419904 }, { 1.00, 7419904, 14671839 } }
         Case cTheme = Upper( "SolidGreenBlue" )
            aGrad := { { 0.01, 9994298, 9994298 },{ 0.01, 9994298, 9994298 } }
         Case cTheme = Upper( "SolidDarkBlue" )
            aGrad := { { 0.50,4720905,4720905 },{ 0.50,4720905,4720905 } }
         Case cTheme = Upper( "SolidBlue" )
            aGrad := { { 0.01, 16711680, 16711680 },{ 0.01, 16711680, 16711680 } }
         Case cTheme = Upper( "DarkBlue" )
            aGrad := { { 0.0, 8388608, 13619151 },{ 0.0, 13619151, 8388608 } }
         Case cTheme = Upper( "LightGreen" )
            aGrad := { { .50, nRGB(210,235,216), nRGB( 255, 255, 255 ) } }
         Case cTheme = Upper( "LightBlue" )
            aGrad := { { .50, nRGB( 201, 217, 237 ), nRGB( 231, 242, 255 ) } }
         Case cTheme = Upper( "LightGrey" )
            aGrad := { { .50, nRGB( 216, 216, 216 ), nRGB( 255, 255, 255 ) } }
         Case cTheme = Upper( "Standard" )
            aGrad := { { .50, nRGB( 236, 233, 216 ), nRGB( 255, 255, 255 ) } }
         Case cTheme = Upper( "DarkGrey" )
            aGrad := { { 0.87, 16777215, 11513775 },{ 0.87,11513775, 16777215 } }
         Case cTheme = Upper( "SolidGrey" )
            aGrad := { { .50, nRGB( 233, 233, 233 ), nRGB( 233, 233, 233 ) } }
         Case cTheme = Upper( "SolidChoral" )
            aGrad := { { 0.01,8388736,8388736 },{ 0.01,8388736,8388736 } }
         Case cTheme = Upper( "LightYellow" )
            aGrad := { { 0.01,8440801,16777215 },{ 0.75,16777215,8440801 } }
         Case cTheme = Upper( "GreenBlue" )
            aGrad := { { .50, nRGB( 192, 192, 192 ), nRGB( 45, 121, 147 ) } }
         //Case cTheme = ""
      EndCase
   else
      if Valtype( cTheme ) == "A"
         aGrad   := cTheme
      endif
   endif
   if !Empty( aGrad )
      SetDlgGradient( aGrad )
   endif
Return nil


Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
Posts: 8515
Joined: Tue Dec 20, 2005 07:36 PM
Re: Cuál es la mejor manera de cambiar el fondo de los dialogos
Posted: Thu Jul 20, 2017 02:09 PM
Samples/source completo para testes:

https://www.4shared.com/rar/7EphzsFyei/TESTURL.html

Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341

Continue the discussion