Jump to content
Fivewin Brasil

Mudar Cor de um Say em tempo de execução.


rmarra

Recommended Posts

Olá pessoal, tentei conforme abaixo e não funciona. Como faço ???

if GetKeyState( VK_F12 )

if Teste = "S"

oSayCaixa:SetColor(CLR_BLUE)

Teste:= "N"

else

oSayCaixa:SetColor(rgb(255,0,0))

Teste := "S"

endif

oSayCaixa:Refresh()

endif

Clipper 5.3b, Fivewin 2.6, Blinker 7, WorkShop

Link to comment
Share on other sites

Olá pessoal, tentei conforme abaixo e não funciona. Como faço ???

if GetKeyState( VK_F12 )

if Teste = "S"

oSayCaixa:SetColor(CLR_BLUE)

Teste:= "N"

else

oSayCaixa:SetColor(rgb(255,0,0))

Teste := "S"

endif

oSayCaixa:Refresh()

endif

Clipper 5.3b, Fivewin 2.6, Blinker 7, WorkShop

Link to comment
Share on other sites

Olá pessoal, tentei conforme abaixo e não funciona. Como faço ???

if GetKeyState( VK_F12 )

if Teste = "S"

oSayCaixa:SetColor(CLR_BLUE)

Teste:= "N"

else

oSayCaixa:SetColor(rgb(255,0,0))

Teste := "S"

endif

oSayCaixa:Refresh()

endif

Clipper 5.3b, Fivewin 2.6, Blinker 7, WorkShop

Link to comment
Share on other sites

Não entendo, no exemplo abaixo do Personal ele disse que funciona no meu não. Segue as diferenças.

1- Eu uso redefine Say.

2- Uso a seguinte fonte :Define Font oFntSayCab Size 08,11 Name "MS Sans Serif" Bold

Por que ??? Desde já agradeço pois estou agarrado numa coisa que aparentemente era simples.

----- Funcao do Personal -----

@ l,c Say oDif VAR Transf(_Dif,"@E 999,999.99") OF oDlg Pixel Size 30,10 FONT fBold COLOR PRETO,bege UPDATE

na minha função onde verifico o valor da diferença

_dif:=ValorPago-ValorDevido

If (_dif < 0.00)

oDif:SetColor(VERMELHO,bege)

Else

oDif:SetColor((PRETO,bege)

EndIf

oDif:Refresh()

Return

----- Minha função ------

if GetKeyState( VK_F12 )

if Teste = "S"

oSayCaixa:SetColor(CLR_BLUE,oDlgVenda:nClrPane())

Teste:= "N"

else

oSayCaixa:SetColor(rgb(255,0,0),oDlgVenda:nClrPane())

Teste := "S"

endif

oSayCaixa:Refresh()

endif

Oliveira, Sérgio A.

PERSONAL - LINS

MSN - sergio@personal.com.br

SKYPE - sergio-personal

FWH 2.5 / xHarbour 0.99.3 / brMake / no WS

Clipper 5.3b, Fivewin 2.6, Blinker 7, WorkShop

Editado por - rmarra on 26/10/2005 17:23:25

Editado por - rmarra on 26/10/2005 17:25:03

Link to comment
Share on other sites

Ola

Tente o seguinte

@ 1,1 say oSayCaixa var wSayCaixa of odlg update id=red> color CLR_BLACK,CLR_HBLUE valid mudacor(odlg)

Function mudacor(odlg1)

if Teste = "S"

oSayCaixa:SetColor(CLR_BLACK,CLR_BLUE)

Teste:= "N"

else

oSayCaixa:SetColor(CLR_BLACK,CLR_HRED)

Teste := "S"

endif

odlg1:update()id=red>

Return(.t.)

Yrece

Link to comment
Share on other sites

Prezado, não faz sentido eu usar o valid, segue abaixo como está meu programa. Por que não funcionar ??? Desde já agradeço.

----- Definicao da fonte -----

Define Font oFntSayCab Size 08,11 Name "MS Sans Serif" Bold

----- Redefine Say -----

Redefine Say oSayCaixa of oDlgVenda ID 311 Update Font oFntSayCab Color if ( Teste = "N", rgb(255,0,0), CLR_BLUE )

----- Funcao para mudar cor ao teclar F12 -----

if GetKeyState( VK_F12 )

if PARAME->LACSIFPMS # "S"

if Teste = "S"

oSayCaixa:SetColor( CLR_BLUE, oDlgVenda:nClrPane() )

Teste := "N"

elseif Teste = "N"

oSayCaixa:SetColor( rgb(255,0,0), oDlgVenda:nClrPane() )

Teste := "S"

endif

oSayCaixa:Refresh()

oDlgVenda:Update()

endif

endif

Clipper 5.3b, Fivewin 2.6, Blinker 7, WorkShop

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...