Change text color and background of tRadio

Post Reply
User avatar
Giovany Vecchi
Posts: 223
Joined: Mon Jun 05, 2006 9:39 pm
Location: Brasil

Change text color and background of tRadio

Post by Giovany Vecchi »

I do like this:

Code: Select all | Expand

 Redefine RADIO ::oRad760_DadosCobranca ;
    VAR ::oDs_ClientesEdit:COBRANCA ;
    ID 761,762,763,764  OF ::oFldDetalhes:aDialogs[1] ;
    Color G_COLOR_SYS(2),G_COLOR_SYS(1)
 


In this example, G_COLOR_SYS (2) is white and G_COLOR_SYS (1) is the background.
I can't change the colors of the text or the background of tRadio.
Already tried the Bj: nClrText: = also does not work. This also happens with CheckBox.
Would anyone know any method to make this possible?

Image
User avatar
cnavarro
Posts: 6557
Joined: Wed Feb 15, 2012 8:25 pm
Location: España
Been thanked: 3 times

Re: Change text color and background of tRadio

Post by cnavarro »

As far as I know it is a problem to have active themes (also for checkboxes).
This may work although for me it has never been a good solution.

Code: Select all | Expand


      SetWindowTheme( ::oRad760_DadosCobranca:hWnd, "", "" )
 
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
User avatar
Giovany Vecchi
Posts: 223
Joined: Mon Jun 05, 2006 9:39 pm
Location: Brasil

Re: Change text color and background of tRadio

Post by Giovany Vecchi »

When executing I get the message:

Code: Select all | Expand

Error description: Error BASE/1004  Message not found: TRADMENU:HWND
User avatar
cnavarro
Posts: 6557
Joined: Wed Feb 15, 2012 8:25 pm
Location: España
Been thanked: 3 times

Re: Change text color and background of tRadio

Post by cnavarro »

Sorry, try

Code: Select all | Expand


SetWindowTheme( ::oRad760_DadosCobranca:aItems[ 3 ]:hWnd, "", "" )
 
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
User avatar
Giovany Vecchi
Posts: 223
Joined: Mon Jun 05, 2006 9:39 pm
Location: Brasil

Re: Change text color and background of tRadio

Post by Giovany Vecchi »

Thanks, it worked.
I better change the tRadio class so I don't have to mess with the whole system.
I am creating a kind of Dark Theme, and if I could not change certain controls, it would not work.

Code: Select all | Expand

 ::oDlgCadastro:bInit := <||
    AEval( lc_oSelf:oCliDetConta:oRad760_DadosCobranca:aItems,;
           {|_oRadSeq|SetWindowTheme( _oRadSeq:hWnd, "", "" )})
  Return nil
  > //cEnd
 


Image
User avatar
cnavarro
Posts: 6557
Joined: Wed Feb 15, 2012 8:25 pm
Location: España
Been thanked: 3 times

Re: Change text color and background of tRadio

Post by cnavarro »

Ok, but I don't like the 3dlook style
Try using also this and tell me if it works with redefined controls

Code: Select all | Expand


Ctl3DLook( <yourobjectcontrol>:hWnd, .F. )
 
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
User avatar
cnavarro
Posts: 6557
Joined: Wed Feb 15, 2012 8:25 pm
Location: España
Been thanked: 3 times

Re: Change text color and background of tRadio

Post by cnavarro »

Giovany, Your design is very good, congratulations
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
User avatar
Giovany Vecchi
Posts: 223
Joined: Mon Jun 05, 2006 9:39 pm
Location: Brasil

Re: Change text color and background of tRadio

Post by Giovany Vecchi »

I thought the Set3DLook(.F.) function would solve this question
User avatar
Giovany Vecchi
Posts: 223
Joined: Mon Jun 05, 2006 9:39 pm
Location: Brasil

Re: Change text color and background of tRadio

Post by Giovany Vecchi »

cnavarro wrote:Giovany, Your design is very good, congratulations

Thank you Navarro. We have to show that Fivewin is beyond what we think we can do.

Via Activex Integration
Image

Other controls
Image
User avatar
cnavarro
Posts: 6557
Joined: Wed Feb 15, 2012 8:25 pm
Location: España
Been thanked: 3 times

Re: Change text color and background of tRadio

Post by cnavarro »

Giovany Vecchi wrote:
cnavarro wrote:Giovany, Your design is very good, congratulations

Thank you Navarro. We have to show that Fivewin is beyond what we think we can do.



The limit is our imagination, without any doubt

Giovany Vecchi wrote:I thought the Set3DLook(.F.) function would solve this question


Have you managed to solve the 3D effect?
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
User avatar
Giovany Vecchi
Posts: 223
Joined: Mon Jun 05, 2006 9:39 pm
Location: Brasil

Re: Change text color and background of tRadio

Post by Giovany Vecchi »

Have you managed to solve the 3D effect?


I did not make it.
I noticed that even putting at the beginning of the program the option Set3dLook (.F.) OR .T., Does not change anything.
Post Reply