Dear friends, how can I change the readonly and/or disable GETs background color?
EMG
Dear friends, how can I change the readonly and/or disable GETs background color?
EMG
#include "fivewin.ch"
FUNCTION Main()
local oForm, oSay, oGet, oGet2, nValue := 0, nValue2 := 0, oBot2
DEFINE DIALOG oForm TITLE "Background Disable gets" FROM 05,15 TO 13,70
@ 05,70 GET oGet VAR nValue PICTURE "9999" PIXEL OF oForm RIGHT when(nValue2 = 0)
@ 20,70 GET oGet2 VAR nValue2 PICTURE "9999" PIXEL OF oForm RIGHT
oGet:nClrTextDis := nRgb(0,255,0)
oGet:nClrPaneDis := nRgb(255,0,0)
oGet:lDisColors := .f.
@ 35,40 BUTTON oBot2 PROMPT "&Salir" OF oForm SIZE 30,10 ACTION oForm:End() PIXEL
ACTIVATE DIALOG oForm CENTER
RETURN nilThank you. So we have to color the background during the paint event, right? And "who" exactly give the default COLOR_WINDOW color to the readonly GETs? Is it an internal Windows behaviour that can be change only using paint event?
EMG
Hello Enrico,
Because I just see you here online I have a question:
Enrico, I am a very satisfied user of your dbf editor.
Is there maybe a newer version.
It would be practical for me if I could adjust the column width.
Best regards,
Otto
EMAGDBU.EXE 595.456 10.03.2011 16:05 -a-
Hi Otto, you can find the latest release on my website, in the download section. And no, it is not possible to adjust the columns width, sorry.
EMG
Enrico Maria Giordano wrote:Thank you. So we have to color the background during the paint event, right? And "who" exactly give the default COLOR_WINDOW color to the readonly GETs? Is it an internal Windows behaviour that can be change only using paint event?
EMG
cmsoft wrote:Si no se especifica lDisColors en false ni bColor, el color del panel disable lo genera con nClrP := GetSysColor( COLOR_WINDOW )
//TGet():bColorBlock := { |oGet| IF( oGet:lFocused, { CLR_WHITE, CLR_HBLUE }, IF( .NOT. oGet:lActive, {CLR_BLACK, CLR_HGRAY}, {CLR_BLACK, CLR_WHITE} )) }
//fix for readonly gets
// TGet():lDisColors := .f.
// TGet():nClrGrayText := 25
Ok, bColorBlock (actually bColor) is evaluated inside paint event. So this is the only option, it seems. I would like to avoid using paint event.
EMG
Ok, never mind, it was my fault, sorry. I can change the GETs color (normal, readonly or disabled) with the usual SetColor() function. I forgot to have some code that changed the color back. ![]()
EMG
TGet():bColorBlock := { |oGet| IF( oGet:lFocused, { CLR_WHITE, CLR_HBLUE }, IF( .NOT. oGet:lActive, {CLR_BLACK, CLR_HGRAY}, {CLR_BLACK, CLR_WHITE} )) }
@ 10, 150 SAY ":" GET aoGET[ 6 ] VAR oAcctRec2:mail_to SIZE 450, C_GETH PIXEL OF oWnd ;
NOBORDER FONT oApp:oFontGet UPDATE WHEN ( nGrpd == 2 )Enrico
Hope this is what you are looking for ...
SetGetColorFocus( rgb(209,224,252) ) // global color for gets
Rick Lipkin
Hi Rick ,
I had tried this SetGetColorFocus but does not work for READONLY GETs .
Thanks
Shridhar
#Include "Fivewin.Ch"
#Define CLR_SOFTYELLOW nRGB( 255, 251, 225 )
FUNCTION Main()
LOCAL...
MEMVAR...
PRIVATE..
PUBLIC...
SetBalloon( .T. )
SkinButtons()
SetGetColorFocus( CLR_LGREEN )
tGet():lDisColors := .F. // WHEN( .F. )
tGet():nClrTextDis := CLR_HBLUE
tGet():nClrPaneDis := CLR_SOFTYELLOW
// continue...
RETURN NILHi Karinha ,
Thanks for this but mine requirement is bit different as given below :
GETs are classified
==================
READ/WRITE GET Focus ==> { nRGB(111, 30, 81) , nRGB(245, 235, 147) }
READ/WRITE GET Un-Focus ==> { nRGB(43, 43, 43) , nRGB(248, 239, 186) }
READONLY GET ==> { nRGB(43, 43, 43) , nRGB(248, 239, 186) }
How we can achieve this ?
Thanks
Shridhar