Page 1 of 1

FORGROUND BACK GROUND COLORS GETS

Posted: Mon Jul 23, 2007 5:43 pm
by PAUL SIMM
In the old TGET.PRG we allowed the cliente to choose general foreground and background colors and applied the choice with these two lines.
COLOR_S is a public containing the clientes choice DEFAULT value
COLOR_S:= 16777215

::bGotFocus := {|| ::SetColor(nClrFore,COLOR_S)}
::bLostFocus := {|| ::SetColor(nClrFore, RGB(255,255,255))}

How can I apply the same system in the new TGET.PRG for FWH

Posted: Tue Jul 24, 2007 3:14 am
by James Bott
Paul,

What do you mean by the "old" and the "new" -- can you provide us with versions?

I assume it isn't working in the "new" FWH? What exactly is happening? What happens if you replace the codeblocks with msgBeep(); do you hear the beep?

Can you provide us with a small example that shows the problem?

James

Re: FORGROUND BACK GROUND COLORS GETS

Posted: Tue Jul 24, 2007 7:17 am
by Ugo
PAUL SIMM wrote:In the old TGET.PRG we allowed the cliente to choose general foreground and background colors and applied the choice with these two lines.
COLOR_S is a public containing the clientes choice DEFAULT value
COLOR_S:= 16777215

::bGotFocus := {|| ::SetColor(nClrFore,COLOR_S)}
::bLostFocus := {|| ::SetColor(nClrFore, RGB(255,255,255))}

How can I apply the same system in the new TGET.PRG for FWH
Paul,

in tget.prg add this method:

Code: Select all

 
   METHOD SetIniClr() 


add at the end of define:

Code: Select all

   ...
   endif
   ::SetIniClr()
return Self
add at the end of redefine:

Code: Select all

   ...
   endif
   ::SetIniClr()
   oWnd:DefControl( Self )
return Self
add the method:

Code: Select all

METHOD SetIniClr() CLASS TGet

   // This is my standard set:
   ::nClrFocusText := nRGB(0,0,0)           // CLR_BLACK  //
   ::nClrFocusPane := nRGB( 213, 230, 255 ) // nRGB(243,250,200)     // CLR_HBLUE  //
   ::nClrPFoText   := ::nClrText
   ::nClrPFoPane   := ::nClrPane
   //
   ::bGotFocus  := {|| ::SetColor( ::nClrFocusText, ::nClrFocusPane) }
   ::bLostFocus := {|| ::SetColor( ::nClrPFoText  , ::nClrPFoPane  ) }

Return Self
Recompile the fwhx.lib.

CHANGING FOCUSED COLORS GLOBALLT IN TGET

Posted: Mon Jul 30, 2007 6:54 am
by PAUL SIMM
WITH THE CHANGES YOU SUGGESTED TO REDEFINE I GET THE FOLLOWING ERROR:

(CANNOT FIND THE METHOD DEFINE IN THE CLASS )

Heres the Class modified http://www.pes-systems.net/temp/tget32.prg

INFORMACION: Error BASE/1005 Message not found: TGET:_NCLRFOCUSTEXT

Stack Calls
===========
2.TGET:ERROR(175) 3.(b)HBOBJECT:HBOBJECT(105) 4.TGET:MSGNOTFOUND(0)
5.TGET:_NCLRFOCUSTEXT(167) 6.TGET:SETINICLR(1604) 7.TGET:REDEFINE(376)
8.BUS_CLIENTES(174) 9.(b)BUILDMENU(1732) 10.TMENU:COMMAND(0)
11.TWINDOW:COMMAND(0) 12.TWINDOW:HANDLEEVENT(0) 13._FWH(0)
14.WINRUN(0) 15.TWINDOW:ACTIVATE(0) 16.MAIN(424)

Re: CHANGING FOCUSED COLORS GLOBALLT IN TGET

Posted: Mon Jul 30, 2007 7:19 am
by Ugo
PAUL SIMM wrote: INFORMACION: Error BASE/1005 Message not found: TGET:_NCLRFOCUSTEXT
Paul,
insert this line into data section:

Code: Select all

   DATA   nClrFocusText, nClrFocusPane, nClrPFoText, nClrPFoPane

BACLGROUND COLORS GET

Posted: Tue Jul 31, 2007 8:45 am
by PAUL SIMM
THANKS UGO WORKS FINE NOW.

Re: BACLGROUND COLORS GET

Posted: Tue Jul 31, 2007 10:01 am
by Ugo
PAUL SIMM wrote:THANKS UGO WORKS FINE NOW.
Paul,
nothing! :)