FORGROUND BACK GROUND COLORS GETS

Post Reply
User avatar
PAUL SIMM
Posts: 63
Joined: Fri Oct 07, 2005 7:59 am
Location: Madrid, Spain
Contact:

FORGROUND BACK GROUND COLORS GETS

Post 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
Regards/Saludos
Paul

paul@pes-systems.net
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Post 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
User avatar
Ugo
Posts: 283
Joined: Sat Oct 15, 2005 6:40 am
Location: Turin, Italy

Re: FORGROUND BACK GROUND COLORS GETS

Post 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.
Ciao, best regards,
Ugo
User avatar
PAUL SIMM
Posts: 63
Joined: Fri Oct 07, 2005 7:59 am
Location: Madrid, Spain
Contact:

CHANGING FOCUSED COLORS GLOBALLT IN TGET

Post 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)
Regards/Saludos
Paul

paul@pes-systems.net
User avatar
Ugo
Posts: 283
Joined: Sat Oct 15, 2005 6:40 am
Location: Turin, Italy

Re: CHANGING FOCUSED COLORS GLOBALLT IN TGET

Post 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
Ciao, best regards,
Ugo
User avatar
PAUL SIMM
Posts: 63
Joined: Fri Oct 07, 2005 7:59 am
Location: Madrid, Spain
Contact:

BACLGROUND COLORS GET

Post by PAUL SIMM »

THANKS UGO WORKS FINE NOW.
Regards/Saludos
Paul

paul@pes-systems.net
User avatar
Ugo
Posts: 283
Joined: Sat Oct 15, 2005 6:40 am
Location: Turin, Italy

Re: BACLGROUND COLORS GET

Post by Ugo »

PAUL SIMM wrote:THANKS UGO WORKS FINE NOW.
Paul,
nothing! :)
Ciao, best regards,
Ugo
Post Reply