IF lStatus
oSay:SETCOLOR( CLR_BLUE, CLR_YELLOW )
oSay1:SETCOLOR( METRO_GREEN, CLR_YELLOW )
oSay1:oWnd:SetBrush( oSay1:oBrush )
ELSE
oSay:SETCOLOR( CLR_YELLOW, METRO_PINK )
oSay1:SETCOLOR( METRO_RED, METRO_PINK )
oSay1:oWnd:SetBrush( oSay1:oBrush )
ENDIF
REDEFINE FOLDEREX oFld1 ID 110 OF oDlg;
PROMPT "&Clipper", "&Windows" DIALOGS "Sub1", "Sub2"
oFld1:aDialogs[1]:lTransparent := .F.
....
#include "FIVEWIN.CH"
STATIC oDlg, oSay, oSay2, oBr
FUNCTION MAIN()
local oFld1, oBtn, oCheck
local lCheck := .f.
DEFINE BRUSH oBr COLOR CLR_GREEN
DEFINE DIALOG oDlg RESOURCE "DIALOG0"
REDEFINE FOLDEREX oFld1 ID 110 OF oDlg;
PROMPT "&Clipper", "&Windows" DIALOGS "Sub1", "Sub2"
oFld1:aDialogs[1]:lTransparent := .F.
REDEFINE SAY oSay ID 1001 OF oFld1:aDialogs[1] //UPDATE
//oSay:lTransparent := .T.
REDEFINE SAY oSay2 ID 1004 OF oFld1:aDialogs[1] UPDATE
oSay2:Disable()
REDEFINE CHECKBOX oCheck VAR lCheck ID 1003 OF oFld1:aDialogs[1]
REDEFINE BUTTON oBtn ID 1002 OF oFld1:aDialogs[1];
ACTION ChangeColor( oFld1 )
// ACTION ( oSay2:Enable()) // oFld:aDialogs[1]:Refresh()
ACTIVATE DIALOG oDlg CENTERED //ON INIT oFld1:Default() // oFld1:aDialogs[ 1 ]:oBrush:End()
oBr:End()
return nil
//----------------------------------------------------------------------------//
FUNCTION ChangeColor( oFld1 )
STATIC lStatus := .F.
IF lStatus
oSay:SETCOLOR( CLR_BLUE, CLR_HRED, oBr )
ELSE
oSay:SETCOLOR( CLR_HRED, CLR_WHITE, oBr )
ENDIF
oFld1:aDialogs[ 1 ]:Refresh()
//oSay:Refresh()
//oSay:UpDate()
//oFld1:Refresh()
//oFld1:UpDate()
//oFld1:SetOption( 2 )
//oDlg:UpDate()
//oFld1:SetOption( 1 )
lStatus = ! lStatus
RETURN Nil
DIALOG0 DIALOGEX 44,23,315,171
FONT 8,"MS Sans Serif"
LANGUAGE 7,1
STYLE WS_POPUP|WS_VISIBLE|WS_CAPTION|WS_SYSMENU|DS_MODALFRAME|DS_3DLOOK
BEGIN
CONTROL "",110,"TFOLDEREX",WS_CHILDWINDOW|WS_VISIBLE|WS_TABSTOP,4,5,305,163
END
sub1 DIALOGEX 18,18,264,159
FONT 8,"MS Sans Serif"
LANGUAGE 7,1
STYLE WS_CHILDWINDOW|WS_VISIBLE|DS_3DLOOK
BEGIN
CONTROL "Text",101,"Button",WS_CHILDWINDOW|WS_VISIBLE|WS_GROUP|WS_TABSTOP|BS_AUTORADIOBUTTON,24,33,28,12
CONTROL "this is a Label 1 with Information",1001,"Static",WS_CHILDWINDOW|WS_VISIBLE,24,60,165,9
CONTROL "Click me",1002,"Button",WS_CHILDWINDOW|WS_VISIBLE|WS_TABSTOP,57,102,54,15
CONTROL "Checkbox",1003,"Button",WS_CHILDWINDOW|WS_VISIBLE|WS_TABSTOP|BS_AUTOCHECKBOX,27,15,54,9
CONTROL "this is a Label 2 with Information",1004,"Static",WS_CHILDWINDOW|WS_VISIBLE,24,75,168,9
END
sub2 DIALOGEX 18,18,273,150
FONT 8,"MS Sans Serif"
LANGUAGE 7,1
STYLE WS_CHILDWINDOW|WS_VISIBLE|DS_3DLOOK
BEGIN
CONTROL "Text",102,"Button",WS_CHILDWINDOW|WS_VISIBLE|WS_GROUP|WS_TABSTOP|BS_AUTORADIOBUTTON,37,30,28,12
CONTROL "Label 2",1001,"Static",WS_CHILDWINDOW|WS_VISIBLE,39,60,54,9
END
......
oFld1:aDialogs[1]:lTransparent := .F.
.....
FUNCTION ChangeColor( oFld1 )
......
oSay:Refresh()
oSay:UpDate()
oSay3:Refresh()
oSay3:UpDate()
oFld1:Refresh()
oFld1:UpDate()
oFld1:SetOption( 2 )
oWnd:UpDate()
oFld1:SetOption( 1 )
checo176 wrote:Daniel:
Gracias por tu sugerencia. Efectivamente el problema estaba en dejar no transparente el contenedor del SAY, es decir usar la clausula :
- Code: Select all Expand view
......
oFld1:aDialogs[1]:lTransparent := .F.
.....
y mantener en la la función del cambio de Color las siguientes comandos, motivo por el cual a Cristobal no le funcionada:
- Code: Select all Expand view
FUNCTION ChangeColor( oFld1 )
......
oSay:Refresh()
oSay:UpDate()
oSay3:Refresh()
oSay3:UpDate()
oFld1:Refresh()
oFld1:UpDate()
oFld1:SetOption( 2 )
oWnd:UpDate()
oFld1:SetOption( 1 )
Finalmente la imagen que pude obtener es la que necesitaba, es decir finalmente se puede cambiar el Fondo del SAY en TFolderEx
subir fotos
Daniel, nuevamente muchas gracias por tu sugerencia
Un abrazo desde Chile
Return to FiveWin para Harbour/xHarbour
Users browsing this forum: Google [Bot] and 68 guests