FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Changing color from say
Posts: 142
Joined: Sun Oct 09, 2005 10:59 AM
Changing color from say
Posted: Tue Oct 03, 2006 07:55 AM
Hello,

I try to change the text color from a say object with :

oSay:Setcolor(CLR_HRED) ; oSay:refresh()

But , it doesn't work.

I Tryed it also in testsay2.prg , no succes

// A sample showing to to let a SAY accept Clicks events

#include "FiveWin.ch"

function Main()

   local oDlg, oSay, oCursor

   DEFINE CURSOR oCursor HAND

   DEFINE DIALOG oDlg

   @ 2, 2 SAY oSay PROMPT "Test"

   oSay:lWantClick = .t.
   oSay:bLClicked  = { || oSay:SetColor(CLR_HRED) , oSay:refresh() }
   //oSay:bLClicked  = { || MsgInfo( "Hello" ) }
   oSay:oCursor    = oCursor

   ACTIVATE DIALOG oDlg CENTERED

return nil


Frank
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Changing color from say
Posted: Tue Oct 03, 2006 08:10 AM
Frank,

This code works fine:
#define COLOR_BTNFACE       15
...
   oSay:bLClicked  = { || oSay:SetColor( CLR_WHITE, GetSysColor( COLOR_BTNFACE ) ), oSay:Refresh(), MsgInfo( "Hello" ) }
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 142
Joined: Sun Oct 09, 2005 10:59 AM
Changing color from say
Posted: Tue Oct 03, 2006 08:43 AM

Antonio,

Ok , it seems that the background color can't be omitted. I supposed that when it is nil , it has not to change. Now i have to know what this color is or ,

oSay:SetColor( CLR_HRED , osay:nClrPane )

Frank

Continue the discussion