FORGROUND BACK GROUND COLORS GETS

FORGROUND BACK GROUND COLORS GETS

Postby PAUL SIMM » Mon Jul 23, 2007 5:43 pm

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
PAUL SIMM
 
Posts: 83
Joined: Fri Oct 07, 2005 7:59 am
Location: Madrid, Spain

Postby James Bott » Tue Jul 24, 2007 3:14 am

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
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: FORGROUND BACK GROUND COLORS GETS

Postby Ugo » Tue Jul 24, 2007 7:17 am

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

   METHOD SetIniClr()


add at the end of define:
Code: Select all  Expand view
   ...
   endif
   ::SetIniClr()
return Self


add at the end of redefine:
Code: Select all  Expand view
   ...
   endif
   ::SetIniClr()
   oWnd:DefControl( Self )
return Self


add the method:
Code: Select all  Expand view
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
Ugo
 
Posts: 283
Joined: Sat Oct 15, 2005 6:40 am
Location: Turin, Italy

CHANGING FOCUSED COLORS GLOBALLT IN TGET

Postby PAUL SIMM » Mon Jul 30, 2007 6:54 am

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
PAUL SIMM
 
Posts: 83
Joined: Fri Oct 07, 2005 7:59 am
Location: Madrid, Spain

Re: CHANGING FOCUSED COLORS GLOBALLT IN TGET

Postby Ugo » Mon Jul 30, 2007 7:19 am

PAUL SIMM wrote: INFORMACION: Error BASE/1005 Message not found: TGET:_NCLRFOCUSTEXT

Paul,
insert this line into data section:
Code: Select all  Expand view
   DATA   nClrFocusText, nClrFocusPane, nClrPFoText, nClrPFoPane
Ciao, best regards,
Ugo
User avatar
Ugo
 
Posts: 283
Joined: Sat Oct 15, 2005 6:40 am
Location: Turin, Italy

BACLGROUND COLORS GET

Postby PAUL SIMM » Tue Jul 31, 2007 8:45 am

THANKS UGO WORKS FINE NOW.
Regards/Saludos
Paul

paul@pes-systems.net
User avatar
PAUL SIMM
 
Posts: 83
Joined: Fri Oct 07, 2005 7:59 am
Location: Madrid, Spain

Re: BACLGROUND COLORS GET

Postby Ugo » Tue Jul 31, 2007 10:01 am

PAUL SIMM wrote:THANKS UGO WORKS FINE NOW.

Paul,
nothing! :)
Ciao, best regards,
Ugo
User avatar
Ugo
 
Posts: 283
Joined: Sat Oct 15, 2005 6:40 am
Location: Turin, Italy


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 40 guests