TITLE CLASS BUG with oDLg TRansparent - RESOLVED-

TITLE CLASS BUG with oDLg TRansparent - RESOLVED-

Postby Silvio.Falconi » Fri Mar 15, 2024 3:55 pm

seem not run ok TTItle class with a dialog TRansparent


DEFINE DIALOG oDlg SIZE aCooDlg[1], aCooDlg[2] PIXEL TRUEPIXEL;
FONT oFont TITLE "Configurazione" COLOR CLR_BLACK, rgb(245,245,235) TRANSPARENT;
STYLE nOR( DS_MODALFRAME, WS_POPUP, WS_CAPTION, WS_SYSMENU, ;
WS_MINIMIZEBOX) ICON oIcon

@ nRow, 0 TITLE oTitle OF oDlg SIZE 1025, 65 NOBORDER ;
oTitle:aGrdBack := { { 1, Rgb(250,250,245),rgb(210,210,205) } }
oTitle:nShadow := 0


ACTIVATE DIALOG


the Title control gradient is not visible and take the color of the dialog
Last edited by Silvio.Falconi on Mon Mar 18, 2024 7:32 pm, edited 1 time in total.
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7068
Joined: Thu Oct 18, 2012 7:17 pm

Re: TITLE CLASS BUG with oDLg TRansparent

Postby karinha » Fri Mar 15, 2024 7:24 pm

No puede ser asi?

Code: Select all  Expand view  RUN

// C:\FWH\SAMPLES\SILVTIT.PRG

#include "fivewin.ch"
#include "ttitle.ch"

#define CLR_MSPURPLE RGB( 128,  57, 123 )
#define CLR_MSRED    RGB( 232,  17,  35 )
#define CLR_MSGRAY   RGB( 229, 229, 229 )

FUNCTION Main()

   LOCAL oDlg, oFont, cTitle, oTitle, cTextTl, oIcon, aGrad, oTitle1

   cTiTle  := "Configurazione"
   cTextTl := "PRUEBA DE TITLE DE FIVEWIN"

   DEFINE ICON oIcon FILENAME "..\icons\customer.ico"
   DEFINE FONT oFont  NAME "Blackoak Std" SIZE 12, 30

   aGrad := { { 0.30, CLR_WHITE, CLR_MSPURPLE },{ 0.50, CLR_MSPURPLE, CLR_WHITE } }

   DEFINE DIALOG oDlg SIZE 420, 200 PIXEL TRUEPIXEL FONT oFont TITLE cTitle  ;
      GRADIENT aGrad ICON oIcon

   oDlg:lHelpIcon := .F.

   @ 05, 00 TITLE oTitle SIZE 416, 50 OF oDlg SHADOW BOTTOMLEFT SHADOWSIZE 6
   // SHADOW TOPRIGHT // SHADOW NOSHADOW // NOBORDER

   @ 10, 09 TITLETEXT OF oTitle TEXT cTextTl FONT oFont 3d COLOR CLR_MSGRAY

   oTitle:lBorder :=.T.
   oTitle:aGrdBack = { { 1, nRGB( 129, 130, 138 ), nRGB( 59, 60, 62 ) } }

   oTitle:nShadowIntensity = 70

   @ 060, 150 TITLE oTitle1 SIZE 225, 60 OF oDlg SHADOW TOPRIGHT

   oTitle1:lBorder :=.T.
   oTitle1:aGrdBack = { { 1, nRGB( 129, 130, 138 ), nRGB( 59, 60, 62 ) } }
   oTitle1:nShadowIntensity = 70

   @ 30, 10 TITLETEXT OF oTitle1 TEXT FWVERSION FONT oFont 3d COLOR CLR_MSRED

   ACTIVATE DIALOG oDlg CENTERED

   oFont:End()

RETURN NIL

// FIN / END
 


Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7831
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: TITLE CLASS BUG with oDLg TRansparent

Postby Silvio.Falconi » Sat Mar 16, 2024 3:31 pm

karinha wrote:No puede ser asi?

Code: Select all  Expand view  RUN

// C:\FWH\SAMPLES\SILVTIT.PRG

#include "fivewin.ch"
#include "ttitle.ch"

#define CLR_MSPURPLE RGB( 128,  57, 123 )
#define CLR_MSRED    RGB( 232,  17,  35 )
#define CLR_MSGRAY   RGB( 229, 229, 229 )

FUNCTION Main()

   LOCAL oDlg, oFont, cTitle, oTitle, cTextTl, oIcon, aGrad, oTitle1

   cTiTle  := "Configurazione"
   cTextTl := "PRUEBA DE TITLE DE FIVEWIN"

   DEFINE ICON oIcon FILENAME "..\icons\customer.ico"
   DEFINE FONT oFont  NAME "Blackoak Std" SIZE 12, 30

   aGrad := { { 0.30, CLR_WHITE, CLR_MSPURPLE },{ 0.50, CLR_MSPURPLE, CLR_WHITE } }

   DEFINE DIALOG oDlg SIZE 420, 200 PIXEL TRUEPIXEL FONT oFont TITLE cTitle  ;
      GRADIENT aGrad ICON oIcon

   oDlg:lHelpIcon := .F.

   @ 05, 00 TITLE oTitle SIZE 416, 50 OF oDlg SHADOW BOTTOMLEFT SHADOWSIZE 6
   // SHADOW TOPRIGHT // SHADOW NOSHADOW // NOBORDER

   @ 10, 09 TITLETEXT OF oTitle TEXT cTextTl FONT oFont 3d COLOR CLR_MSGRAY

   oTitle:lBorder :=.T.
   oTitle:aGrdBack = { { 1, nRGB( 129, 130, 138 ), nRGB( 59, 60, 62 ) } }

   oTitle:nShadowIntensity = 70

   @ 060, 150 TITLE oTitle1 SIZE 225, 60 OF oDlg SHADOW TOPRIGHT

   oTitle1:lBorder :=.T.
   oTitle1:aGrdBack = { { 1, nRGB( 129, 130, 138 ), nRGB( 59, 60, 62 ) } }
   oTitle1:nShadowIntensity = 70

   @ 30, 10 TITLETEXT OF oTitle1 TEXT FWVERSION FONT oFont 3d COLOR CLR_MSRED

   ACTIVATE DIALOG oDlg CENTERED

   oFont:End()

RETURN NIL

// FIN / END
 


Regards, saludos.




??????????????????????????

Once again I can't understand your attitude. if I asked for a specific thing, i.e. the title class on a dialog with transparent mode, does it mean that I found a Bug but in your opinion I would be a fool?

you have already written heresies to me other times together with your snack friend.

and since you don't want to understand I'll make you a little drawing

Image

the dialog color is COLOR CLR_BLACK, RGB( 245,245,235)

the title color is oTitle:aGrdBack := { { 0.5, Rgb(250,250,245), Rgb(250,250,245) } }

are not the same !!!!


the test
Code: Select all  Expand view  RUN
#include "FiveWin.ch"
#include "Constant.ch"
#include "ttitle.ch"

Function Test()
local oDlg,oFont,oBold
local oBar
local oTitle,oFontTitle,oBoldTitle
local aBtnBar[2]

           local nRow:= 0,nCol:= 10
           local nInterlinea := 30

           local nBottom:= 41
           local nRight := 94.6
           local nHt  := nBottom * DLG_CHARPIX_H
           local nWd  := Max( nRight * DLG_CHARPIX_W, 180 )


        oFont := TFont():New( "TAHOMA", 0, 18,, )
        oBold := TFont():New( "TAHOMA", 0, 14,,.t. )
        oFontTitle := TFont():New( "TAHOMA", 0, 18,, )
        oBoldTitle := TFont():New( "TAHOMA", 0, 18,,.t. )

 DEFINE DIALOG oDlg SIZE nWd , nHt PIXEL TRUEPIXEL;
       FONT oFont TITLE "Configurazione"  COLOR CLR_BLACK, RGB( 245,245,235)  TRANSPARENT;
       STYLE nOR( DS_MODALFRAME, WS_POPUP, WS_CAPTION, WS_SYSMENU, ;
                  WS_MINIMIZEBOX)




//-----------------------------------title
    @ nRow, 0 TITLE oTitle OF oDlg SIZE 1025, 65 NOBORDER //PIXEL
        oTitle:aGrdBack := { { 0.5, Rgb(250,250,245), Rgb(250,250,245) } }
        oTitle:nShadow  := 0
     nRow+=2
    @ nRow, nCol TITLEIMG OF oTitle RESNAME "C:\work\fwh\bitmaps\pngs\home.png" SIZE 48, 48 REFLEX TRANSPARENT
    nRow+=14
    @ nRow, 75 TITLETEXT OF oTitle TEXT "Big Title" FONT oBoldTitle
    nRow+=20
    @ nRow, 75 TITLETEXT OF oTitle TEXT "Sub Title  " FONT oFonttitle
    //------------------------------------------------


 DEFINE BUTTONBAR oBar OF oDlg  SIZE 92,82  BOTTOM NOBORDER  2015

         oBar:bClrGrad := { | lPressed | If( ! lPressed,;
                 { { 1, RGB( 250,250,245), RGB( 250,250,245)} },;
                 { { 1, RGB( 245,245,235), RGB( 245,245,235)} } ) }

 DEFINE BUTTON aBtnBar[1] OF oBar PROMPT "Aiuto" RESOURCE "HLP_DLG"  ;
                 ACTION  NIL
 DEFINE BUTTON aBtnBar[2] OF oBar PROMPT "Chiudi" RESOURCE "DLG_NO"  ;
                 ACTION NIL BTNRIGHT

ACTIVATE DIALOG oDlg  CENTER   ;
ON INIT (oDlg:resize(),ChangeButtons( oBar ),;
            Config_Form(oFont,oBold,oDlg))
return nil
//----------------------------------------------------------------------//
Function Config_Form(oFont,oBold,oDlg)
   local aDat[ 1]
   local l01:=.t.
@  150,8  CHECKBOX  aDat[ 1] VAR l01 Prompt "testesttestesttestesttestesttestest" SIZE 120,  11 PIXEL OF oDlg ;
          COLOR nRgb(233,229,206), nRgb(218,214,179) FONT oBold

return nil

function ChangeButtons( oBar )
       AEval( oBar:aControls, { | oCtrl | oCtrl:nTop += 4, oCtrl:nHeight -= 4 } )
       return .T.


 
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7068
Joined: Thu Oct 18, 2012 7:17 pm

Re: TITLE CLASS BUG with oDLg TRansparent

Postby karinha » Sun Mar 17, 2024 1:36 pm

What about? If you like it, I'll post the code.

¿Que tal? Si te gusta, publicaré el código.

https://imgur.com/vZ67LOJ

Image

I LOVE FIVEWIN!! hahahahahaha,

Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7831
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: TITLE CLASS BUG with oDLg TRansparent

Postby Silvio.Falconi » Sun Mar 17, 2024 2:59 pm

karinha wrote:What about? If you like it, I'll post the code.

¿Que tal? Si te gusta, publicaré el código.

https://imgur.com/vZ67LOJ

Image

I LOVE FIVEWIN!! hahahahahaha,

Regards, saludos.


You still haven't understood anything!!!!

and you insist on taking the piss out of me

look at your image, the TTitle class has the same color as the dialog ....this is exactly the problem


DEFINE DIALOG oDlg SIZE nWd , nHt PIXEL TRUEPIXEL;
FONT oFont TITLE "Configurazione" COLOR CLR_BLACK, RGB( 245,245,235) TRANSPARENT;
STYLE nOR( DS_MODALFRAME, WS_POPUP, WS_CAPTION, WS_SYSMENU, ;
WS_MINIMIZEBOX)

@ nRow, 0 TITLE oTitle OF oDlg SIZE 1025, 65 NOBORDER //PIXEL
oTitle:aGrdBack := { { 0.5, Rgb(250,250,245), Rgb(250,250,245) } }
oTitle:nShadow := 0


Have you now understood what the problem is or do you need a pair of glasses?

I didn't ask you if the checkbox is transparent or to change the color of the buttonbar, I asked you something else

the ttitle class has its own color but takes the color of the dialog
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7068
Joined: Thu Oct 18, 2012 7:17 pm

Re: TITLE CLASS BUG with oDLg TRansparent

Postby karinha » Sun Mar 17, 2024 3:20 pm

y asi?

https://imgur.com/n4ZlOED

Image

Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7831
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: TITLE CLASS BUG with oDLg TRansparent

Postby karinha » Sun Mar 17, 2024 3:39 pm

Silvio, calm down. It's not even me doing the examples, it's a friend who is teaching me how to use TTILE. I'm learning too.

Silvio, cálmate. Ni siquiera soy yo quien hace los ejemplos, es un amigo que me está enseñando a usar TTILE. Yo también estoy aprendiendo.

Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7831
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: TITLE CLASS BUG with oDLg TRansparent

Postby Silvio.Falconi » Sun Mar 17, 2024 5:29 pm

karinha wrote:Silvio, calm down. It's not even me doing the examples, it's a friend who is teaching me how to use TTILE. I'm learning too.

Silvio, cálmate. Ni siquiera soy yo quien hace los ejemplos, es un amigo que me está enseñando a usar TTILE. Yo también estoy aprendiendo.

Regards, saludos.


I can't calm down when you write these heresies to me, you have to use the colors as I sent them to you both for the dialog and for the ttitle class, and the ttitle class must be transparent, the dialog must also be transparent because the checkbox must work , please change the color and size of the throw bar.

A question if you are not capable with the atTitle class why do you send messages and above all because you are a manager of this forum ?

No puedo calmarme cuando me escribes estas herejías, tienes que usar los colores tal como te los envié tanto para el diálogo como para la clase ttitle, y la clase ttitle debe ser transparente, el diálogo también debe ser transparente Debido a que la casilla de verificación debe funcionar, cambie el color y el tamaño de la barra de lanzamiento. Una pregunta si no eres capaz con la clase atTitle ¿por qué envías mensajes y sobre todo por qué eres responsable de este foro?
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7068
Joined: Thu Oct 18, 2012 7:17 pm

Re: TITLE CLASS BUG with oDLg TRansparent

Postby nageswaragunupudi » Mon Mar 18, 2024 5:08 pm

Silvio.Falconi wrote:seem not run ok TTItle class with a dialog TRansparent


DEFINE DIALOG oDlg SIZE aCooDlg[1], aCooDlg[2] PIXEL TRUEPIXEL;
FONT oFont TITLE "Configurazione" COLOR CLR_BLACK, rgb(245,245,235) TRANSPARENT;
STYLE nOR( DS_MODALFRAME, WS_POPUP, WS_CAPTION, WS_SYSMENU, ;
WS_MINIMIZEBOX) ICON oIcon

@ nRow, 0 TITLE oTitle OF oDlg SIZE 1025, 65 NOBORDER ;
oTitle:aGrdBack := { { 1, Rgb(250,250,245),rgb(210,210,205) } }
oTitle:nShadow := 0


ACTIVATE DIALOG


the Title control gradient is not visible and take the color of the dialog


Dear Silvio

This is not a bug. This is the expected behavior.
When a dialog is defined to be TRANSPARENT, controls are painted transparently over the dialog.
That means, the background color/gradient/brush of the control are ignored and only the dialog's background is shown behind the controls too.

If we want to display the background (color/brush/gradient) of a control to be shown, then we should set oControl:lTransparent := .F. in the dialog's init clause.

Please test the small sample. This way you can show the gradient of oTitle on a transparent dialog.
Code: Select all  Expand view  RUN
function Test()

   local oDlg, oTitle

   DEFINE DIALOG oDlg SIZE 600,500 PIXEL TRUEPIXEL ;
      COLOR CLR_BLACK, rgb(245,245,235) ;
      TRANSPARENT

   @ 0,0 TITLE oTitle SIZE 600,60 NOBORDER ;
      GRADIENT  { { 1, Rgb(250,250,245),rgb(210,210,205) } }

   oDlg:bInit := { || oTitle:lTransparent := .f. }

   ACTIVATE DIALOG oDlg CENTERED

return nil
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10646
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: TITLE CLASS BUG with oDLg TRansparent

Postby Silvio.Falconi » Mon Mar 18, 2024 7:31 pm

nageswaragunupudi wrote:
Silvio.Falconi wrote:seem not run ok TTItle class with a dialog TRansparent


DEFINE DIALOG oDlg SIZE aCooDlg[1], aCooDlg[2] PIXEL TRUEPIXEL;
FONT oFont TITLE "Configurazione" COLOR CLR_BLACK, rgb(245,245,235) TRANSPARENT;
STYLE nOR( DS_MODALFRAME, WS_POPUP, WS_CAPTION, WS_SYSMENU, ;
WS_MINIMIZEBOX) ICON oIcon

@ nRow, 0 TITLE oTitle OF oDlg SIZE 1025, 65 NOBORDER ;
oTitle:aGrdBack := { { 1, Rgb(250,250,245),rgb(210,210,205) } }
oTitle:nShadow := 0


ACTIVATE DIALOG


the Title control gradient is not visible and take the color of the dialog


Dear Silvio

This is not a bug. This is the expected behavior.
When a dialog is defined to be TRANSPARENT, controls are painted transparently over the dialog.
That means, the background color/gradient/brush of the control are ignored and only the dialog's background is shown behind the controls too.

If we want to display the background (color/brush/gradient) of a control to be shown, then we should set oControl:lTransparent := .F. in the dialog's init clause.

Please test the small sample. This way you can show the gradient of oTitle on a transparent dialog.
Code: Select all  Expand view  RUN
function Test()

   local oDlg, oTitle

   DEFINE DIALOG oDlg SIZE 600,500 PIXEL TRUEPIXEL ;
      COLOR CLR_BLACK, rgb(245,245,235) ;
      TRANSPARENT

   @ 0,0 TITLE oTitle SIZE 600,60 NOBORDER ;
      GRADIENT  { { 1, Rgb(250,250,245),rgb(210,210,205) } }

   oDlg:bInit := { || oTitle:lTransparent := .f. }

   ACTIVATE DIALOG oDlg CENTERED

return nil


thanks , there was something of strange, now run ok with the myapplication colors.
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7068
Joined: Thu Oct 18, 2012 7:17 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Marc Venken, nageswaragunupudi and 55 guests