FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour FORGROUND BACK GROUND COLORS GETS
Posts: 86
Joined: Fri Oct 07, 2005 07:59 AM
FORGROUND BACK GROUND COLORS GETS
Posted: Mon Jul 23, 2007 05: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
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
FORGROUND BACK GROUND COLORS GETS
Posted: Tue Jul 24, 2007 03: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

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 283
Joined: Sat Oct 15, 2005 06:40 AM
Re: FORGROUND BACK GROUND COLORS GETS
Posted: Tue Jul 24, 2007 07: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:
 
   METHOD SetIniClr()


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


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


add the method:
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
Posts: 86
Joined: Fri Oct 07, 2005 07:59 AM
CHANGING FOCUSED COLORS GLOBALLT IN TGET
Posted: Mon Jul 30, 2007 06: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
Posts: 283
Joined: Sat Oct 15, 2005 06:40 AM
Re: CHANGING FOCUSED COLORS GLOBALLT IN TGET
Posted: Mon Jul 30, 2007 07:19 AM
PAUL SIMM wrote: INFORMACION: Error BASE/1005 Message not found: TGET:_NCLRFOCUSTEXT

Paul,
insert this line into data section:
   DATA   nClrFocusText, nClrFocusPane, nClrPFoText, nClrPFoPane
Ciao, best regards,

Ugo
Posts: 86
Joined: Fri Oct 07, 2005 07:59 AM
BACLGROUND COLORS GET
Posted: Tue Jul 31, 2007 08:45 AM

THANKS UGO WORKS FINE NOW.

Regards/Saludos
Paul

paul@pes-systems.net
Posts: 283
Joined: Sat Oct 15, 2005 06:40 AM
Re: BACLGROUND COLORS GET
Posted: Tue Jul 31, 2007 10:01 AM
PAUL SIMM wrote:THANKS UGO WORKS FINE NOW.

Paul,
nothing! :-)
Ciao, best regards,

Ugo

Continue the discussion