Changing color from say

Changing color from say

Postby Frank Demont » Tue Oct 03, 2006 7: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

Code: Select all  Expand view  RUN
// 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
Frank Demont
 
Posts: 142
Joined: Sun Oct 09, 2005 10:59 am

Postby Antonio Linares » Tue Oct 03, 2006 8:10 am

Frank,

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

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42120
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Frank Demont » Tue Oct 03, 2006 8: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
Frank Demont
 
Posts: 142
Joined: Sun Oct 09, 2005 10:59 am


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 57 guests