Change text color and background of tRadio

Change text color and background of tRadio

Postby Giovany Vecchi » Wed Nov 20, 2019 2:38 pm

I do like this:

Code: Select all  Expand view  RUN
 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
Giovany Vecchi
 
Posts: 223
Joined: Mon Jun 05, 2006 9:39 pm
Location: Brasil

Re: Change text color and background of tRadio

Postby cnavarro » Wed Nov 20, 2019 2:49 pm

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 view  RUN

      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
cnavarro
 
Posts: 6549
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Change text color and background of tRadio

Postby Giovany Vecchi » Wed Nov 20, 2019 3:04 pm

When executing I get the message:
Code: Select all  Expand view  RUN
Error description: Error BASE/1004  Message not found: TRADMENU:HWND
User avatar
Giovany Vecchi
 
Posts: 223
Joined: Mon Jun 05, 2006 9:39 pm
Location: Brasil

Re: Change text color and background of tRadio

Postby cnavarro » Wed Nov 20, 2019 3:12 pm

Sorry, try

Code: Select all  Expand view  RUN

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
cnavarro
 
Posts: 6549
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Change text color and background of tRadio

Postby Giovany Vecchi » Wed Nov 20, 2019 3:36 pm

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 view  RUN
 ::oDlgCadastro:bInit := <||
    AEval( lc_oSelf:oCliDetConta:oRad760_DadosCobranca:aItems,;
           {|_oRadSeq|SetWindowTheme( _oRadSeq:hWnd, "", "" )})
  Return nil
  > //cEnd
 


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

Re: Change text color and background of tRadio

Postby cnavarro » Wed Nov 20, 2019 3:41 pm

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 view  RUN

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: 6549
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Change text color and background of tRadio

Postby cnavarro » Wed Nov 20, 2019 3:50 pm

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
cnavarro
 
Posts: 6549
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Change text color and background of tRadio

Postby Giovany Vecchi » Wed Nov 20, 2019 3:56 pm

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

Postby Giovany Vecchi » Wed Nov 20, 2019 4:11 pm

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
Giovany Vecchi
 
Posts: 223
Joined: Mon Jun 05, 2006 9:39 pm
Location: Brasil

Re: Change text color and background of tRadio

Postby cnavarro » Wed Nov 20, 2019 4:39 pm

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
cnavarro
 
Posts: 6549
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Change text color and background of tRadio

Postby Giovany Vecchi » Wed Nov 20, 2019 4:59 pm

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.
User avatar
Giovany Vecchi
 
Posts: 223
Joined: Mon Jun 05, 2006 9:39 pm
Location: Brasil


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 56 guests