// C:\SILXBRW2\SILVSLOW.PRG - Version: 01// INICIO EN: 12/06/2024// MODIFICADO EN: 13/06/2024 - POR: Joao Santos.#Include "Ambienty.ch" // Todos os includes aqui.#Define aPubGrad
{| lInvert |
If( lInvert, ;
{ { 1 /
3, nRGB
( 255,
253,
222 ), nRGB
( 255,
231,
151 ) }, ;
{ 2 /
3, nRGB
( 255,
215,
84 ), nRGB
( 255,
233,
162 ) } ;
}, ;
{ { 1 /
2, nRGB
( 219,
230,
244 ), nRGB
( 207 -
50,
221 -
25,
255 ) }, ;
{ 1 /
2, nRGB
( 201 -
50,
217 -
25,
255 ), nRGB
( 231,
242,
255 ) } ;
} ) }REQUEST HB_LANG_PT
REQUEST HB_CODEPAGE_PT850
// PARA INDEXAR CAMPOS ACENTUADOSANNOUNCE RDDSYS
// IDEM: ANNOUNCE FPTCDXREQUEST OrdKeyNo, OrdKeyCount, OrdCreate, OrdKeyGoto
REQUEST DBFCDX, DBFFPT
STATIC oWnd, oFont, nHFont, cFont, nWFont, cFontH, oFnt, oFont40
STATIC oMeter, oText, nOpcRadioEnde :=
1STATIC oFont1, oFont2, oFont3
FUNCTION Main
() LOCAL oBmp, oIco, oSaida, oHand, oBar
PUBLIC XRESOLUCAO
hb_gcAll
( .F.
) // PARA LIMPAR A MEMORIA .F. -> Somente se tiver lixo. hb_langSelect
( 'PT' ) // Default language is now Portuguese HB_SETCODEPAGE
( "PT850" ) rddSetDefault
( "DBFCDX" ) rddRegister
( "DBFCDX",
1 ) SET CENTURY
ON SET DATE BRITISH
SET TIME FORMAT
TO "HH:MM:SS" SET EPOCH
TO Year( Date
() ) -
30 SET SOFTSEEK OFF
SET WRAP
ON SetCancel
( .F.
) SET CONFIRM OFF
SET DELETED
ON SET _3DLOOK
ON SET UNIQUE OFF
SET ESCAPE OFF
SET EXACT
ON // CONTROLA O :=, = e == SET EXCLUSIVE OFF
SET MULTIPLE OFF
SET OPTIMIZE
ON cFont :=
"Segoe UI Symbol" // "Calibri" cFontH :=
-14 // -10 //-12 //-16 //-18 //-20 IF !IsWin8
() .AND. !IsWindows10
() cFont :=
"Calibri" // "Tahoma" ENDIF SetBalloon
( .T.
) // Balloon shape required for tooltips SkinButtons
() IF FILE
( "AGUARDE.wav" ) SndPlaySound
( "AGUARDE.wav",
0 ) ENDIF MsgRun
( "ESPERE POR FAVOR... ABRIENDO BASES DE DATOS.", ;
"Espere hasta que se abra. Puede que tarde un poco.", ;
{ || WinExec
( ABERTURA_DOS_BANCOS
() ),
3 } ) XRESOLUCAO :=
"R1024_768" // RESOLUTION DEFINE CURSOR oHand
RESOURCE "Dedo" DEFINE ICON oIco
RESOURCE "ICONE02" // EM IMAGENS.RES DEFINE FONT oFont
NAME cFont
SIZE 0, cFontH WEIGHT
300 DEFINE FONT oFont40
NAME 'Tahoma' SIZE 0, -
40 BOLD
DEFINE WINDOW oWnd
TITLE "xBrowse Sample" ;
MENU BuildMenu
() MENUINFO
3 ICON oIco
MDI oWnd:
SetFont( oFont
) DEFINE BUTTONBAR oBar BUTTONSIZE
50,
54 _3DLOOK TOP
OF oWnd
2007 WITH OBJECT oBar
oBar:
bClrGrad := aPubGrad
// Preferi assim. oBar:
SetFont( oFont
) oBar:
nClrText := CLR_HBLUE
// BLACK oBar:
Adjust() END
DEFINE BUTTON OF oBar FILENAME
".\open.bmp" PROMPT "&Open" FLAT ;
ACTION( XBROWSE_SILV_SLOW
() ) TOOLTIP
"Abrir base de datos." GROUP
DEFINE BUTTON OF oBar FILENAME
".\Index.bmp" PROMPT "&Index" FLAT ;
ACTION( MsgMeter
( { | oMeter, oText, oDlg, lEnd | ;
CREA_INDICES
( oMeter, oText, oDlg, @lEnd
) }, ;
'Aguarde, Indexando Archivo...',
'Por Favor, Espere' ) ) ;
TOOLTIP
"Archivos de índice" GROUP
DEFINE BUTTON OF oBar FILENAME
".\Exit.bmp" PROMPT "Exit" FLAT ;
ACTION( oWnd:
End(), CIERRA_TODO
() ) ;
TOOLTIP
"Salir de la aplicación" GROUP
SET
MESSAGE OF oWnd
TO "© João Santos - +55(11) 9.5150-7341 " ;
+
"- joao@pleno.com.br" +
" - www.pleno.com.br" FONT oFont ;
NOINSET CLOCK DATE KEYBOARD
COLOR CLR_HBLUE, CLR_WHITE
2007 DEFINE BITMAP oBmp FILENAME
".\sea.bmp" oWnd:
bPainted =
{| hDC | BmpTiled
( hDC, oWnd, oBmp
) } ACTIVATE WINDOW oWnd
MAXIMIZEDRETURN NILFUNCTION BuildMenu
() LOCAL oMenu
MENU oMenu
2007 MENUITEM "Información" MENU MENUITEM "&About..." ;
ACTION MsgInfo( FWDESCRIPTION
) ;
FILENAME
".\info.bmp" SEPARATOR MENUITEM "&Finaliza" ;
ACTION( oWnd:
End(), CIERRA_TODO
() ) ;
FILENAME
".\exit.bmp" ENDMENU ENDMENURETURN( oMenu
)FUNCTION ABERTURA_DOS_BANCOS
() PUBLIC DBSILVSLOW
IF .NOT. FILE
( "SILVSLOW.CDX" ) CLOSE DATABASES
USE SILVSLOW
NEW EXCLUSIVE
ALIAS SILVSLOW
INDEX ON Field->FIRST TAG
01 TO SILVSLOW
FOR .NOT. DELETED
() INDEX ON Field->LAST TAG
02 TO SILVSLOW
FOR .NOT. DELETED
() INDEX ON Field->STREET TAG
03 TO SILVSLOW
FOR .NOT. DELETED
() INDEX ON Field->CITY TAG
04 TO SILVSLOW
FOR .NOT. DELETED
() INDEX ON Field->STATE TAG
05 TO SILVSLOW
FOR .NOT. DELETED
() CLOSE DATABASES
ENDIF USE SILVSLOW
ALIAS SILVSLOW
INDEX SILVSLOW
NEW SHARED
SET ORDER
TO 01 DBSILVSLOW :=
ALIAS() // SILVSLOW.DBF GO TOP
RETURN NILFUNCTION CREA_INDICES
( oMeter, oText, oDlg, lEnd
) FIELD FIRST, LAST, STREET, CITY, STATE, MARRIED
LOCAL nTotal :=
100 IF FILE
( "SILVSLOW.CDX" ) AEVAL
(DIRECTORY
( "SILVSLOW.CDX" ),
{ |aFILE| FERASE
(aFILE
[F_NAME
]) } ) ENDIF CLOSE DATABASES
USE SILVSLOW
NEW EXCLUSIVE
ALIAS SILVSLOW
oMeter:
nTotal = RecCount
() INDEX ON Field->FIRST TAG
01 TO SILVSLOW
FOR .NOT. DELETED
() ;
EVAL
( oMeter:
Set( RecNo
() ), CursorWait
(), SysRefresh
() ) EVERY
10 INDEX ON Field->LAST TAG
02 TO SILVSLOW
FOR .NOT. DELETED
() ;
EVAL
( oMeter:
Set( RecNo
() ), CursorWait
(), SysRefresh
() ) EVERY
10 INDEX ON Field->STREET TAG
03 TO SILVSLOW
FOR .NOT. DELETED
() ;
EVAL
( oMeter:
Set( RecNo
() ), CursorWait
(), SysRefresh
() ) EVERY
10 INDEX ON Field->CITY TAG
04 TO SILVSLOW
FOR .NOT. DELETED
() ;
EVAL
( oMeter:
Set( RecNo
() ), CursorWait
(), SysRefresh
() ) EVERY
10 INDEX ON Field->STATE TAG
05 TO SILVSLOW
FOR .NOT. DELETED
() ;
EVAL
( oMeter:
Set( RecNo
() ), CursorWait
(), SysRefresh
() ) EVERY
10 CLOSE DATABASES
ABERTURA_DOS_BANCOS
()RETURN NILFUNCTION XBROWSE_SILV_SLOW
() LOCAL oDlg, oGroup1, oGroup2, oFnt, oFont, IDCor, oSaida, aGet := ARRAY
(5) LOCAL cAlias, oIncluir, oAlterar, oExcluir, oImprimir, oLbx, oRadMenu
LOCAL oFont1, oFont2, oFont3
HB_GCALL
( .F.
) SELECT( DBSILVSLOW
) // SILVSLOW.DBF cAlias :=
ALIAS() IF( XRESOLUCAO =
"R1024_768" ) DEFINE FONT oFont
NAME "Ms Sans Serif" SIZE 00,
-14 BOLD
DEFINE FONT oFnt
NAME "Ms Sans Serif" SIZE 00,
-12 BOLD
DEFINE FONT oFont1
NAME "Calibri" SIZE 0,
-14 DEFINE FONT oFont2
NAME "Segoe UI Light" SIZE 0,
-18 DEFINE FONT oFont3
NAME "Segoe UI" SIZE 0,
-26 ELSEIF
( XRESOLUCAO =
"R1280_768" ) DEFINE FONT oFont
NAME "Ms Sans Serif" SIZE 00,
-16 BOLD
DEFINE FONT oFnt
NAME "Ms Sans Serif" SIZE 00,
-12 BOLD
DEFINE FONT oFont1
NAME "Calibri" SIZE 0,
-16 DEFINE FONT oFont2
NAME "Segoe UI Light" SIZE 0,
-20 DEFINE FONT oFont3
NAME "Segoe UI" SIZE 0,
-28 ENDIF aGrad :=
{ { 0.30, CLR_WHITE, CLR_WHITE
},
{ 0.50, CLR_WHITE, CLR_WHITE
} } DEFINE CURSOR oCurDedo
RESOURCE "Dedo" IF( XRESOLUCAO =
"R1024_768" ) DEFINE DIALOG oDlg
RESOURCE "BROWSE_CAD_PROPOSTA_1024_768" GRADIENT aGrad
ELSEIF
( XRESOLUCAO =
"R1280_768" ) DEFINE DIALOG oDlg
RESOURCE "BROWSE_CAD_PROPOSTA_1280_768" GRADIENT aGrad
ENDIF oDlg:
lHelpIcon := .F.
REDEFINE RADIO oRadMenu
VAR nOpcRadioEnde
ID 201,
202,
203,
204,
205 OF oDlg ;
UPDATE ON CHANGE( CAMBIAR_INDICE_SLOW
( nOpcRadioEnde, cAlias, oLbx
), ;
oLbx:
Refresh(), oLbx:
SetFocus() ) // FIELD FIRST, LAST, STREET, CITY, STATE oRadMenu:
aItems[1]:
cTooltip :=
"Por FIRST" oRadMenu:
aItems[2]:
cTooltip :=
"Por LAST" oRadMenu:
aItems[3]:
cTooltip :=
"Por STREET" oRadMenu:
aItems[4]:
cTooltip :=
"Por CITY" oRadMenu:
aItems[5]:
cTooltip :=
"Por STATE" // oRadio:aItems[3]:Disable() // DESABILITA O RADIO oRadMenu:
SetFont( oFnt
) REDEFINE SAY ID 404 OF oDlg COLORS CLR_BLACK, CLR_WHITE
UPDATE FONT oFnt TRANSPARENT
REDEFINE SAY ID 405 OF oDlg COLORS CLR_CYAN, CLR_WHITE
UPDATE FONT oFnt TRANSPARENT
REDEFINE GROUP oGroup1
ID 501 OF oDlg
COLOR CLR_ORANGE, CLR_WHITE
FONT oFnt TRANSPARENT
REDEFINE GROUP oGroup2
ID 502 OF oDlg
COLOR CLR_ORANGE, CLR_WHITE
FONT oFnt TRANSPARENT
REDEFINE LISTBOX oLbx FIELDS ;
( cAlias
)->FIRST , ;
( cAlias
)->LAST , ;
( cAlias
)->STREET , ;
( cAlias
)->CITY , ;
( cAlias
)->STATE , ;
( cAlias
)->MARRIED , ;
SPACE
(01) ;
HEADERS
( OemToAnsi
( "FIRST:" ) ) , ;
( OemToAnsi
( "LAST:" ) ) , ;
( OemToAnsi
( "STREET:" ) ) , ;
( OemToAnsi
( "CITY:" ) ) , ;
( OemToAnsi
( "STATE:" ) ) , ;
( OemToAnsi
( "MARRIED:" ) ) , ;
( OemToAnsi
( " - " ) ) ;
FIELDSIZES
150,
150,
250,
250,
90,
90,
01 ;
COLOR CLR_BROWN, CLR_LGREEN
CURSOR oCurDedo
FONT oFont
UPDATE ;
ID 101 OF oDlg
//-----------------------------------------------------------------------// oLbx:
nClrBackHead := CLR_LGREEN
// Cor do Fundo do Cabe‡alho oLbx:
nClrText :=
{|| nRGB
( 165,
42,
42 ) } // Cor do Fundo do Cabe‡alho oLbx:
nClrBackFocus := CLR_HRED
// Cor do Cursor Em Cima do Ötem oLbx:
nClrForeFocus := CLR_AMARELO
// Cor da letra da barra ativa oLbx:
nClrForeHead := CLR_HRED
// Cor nos Headers - Cabe‡alhos // Cor no Pano de Fundo da Browse() Listbox-Legal - abaixo o comando oLbx:
nClrPane :=
{ || IIF
( ( oLbx:
cAlias )->
( OrdKeyNo
() ) %
2 ==
0, ;
CLR_LGREEN, CLR_LGRAY
) } oLbx:
nColAct :=
2 // Onde o Cursor Vai Iniciar na coluna oLbx:
nLineStyle :=
3 // Estilo das linhas nos dados da Browse oLbx:
lCellStyle := .T.
// Somente pinta a c‚lula em que o cursor esta no momento // Justifica o Cabe‡alho: .F. = Esquerda .T. = Centro oLbx:
aJustify :=
{ .F., .F., .F., .F., .T., .F., .F.
} oLbx:
lMChange := .F.
// Desabilita Mousemove - Movimentos do Mouse Congelam. oLbx:
SetFocus() // Refocus on The Browse - Ativa o Foco na ListBox(Browse) oLbx:
Refresh() // Estabiliza o Browse/Listbox - Refresca os Dados. // Pinta os Dados Novamente //-----------------------------------------------------------------------// REDEFINE BUTTONBMP oSaida
ID 301 OF oDlg
RESOURCE "154" TEXTRIGHT ;
ACTION ( oDlg:
End() ) CANCEL
oSaida:
cTooltip :=
{ "Click no Botão Para Sair", ;
"Saida - Exit - Cancelar ",
1, CLR_WHITE, CLR_CYAN
} SET
FONT OF oSaida
TO oFont
ACTIVATE DIALOG oDlg
ON INIT CTRLS_COLORS
( oDlg
) oFont:
End() oFnt:
End() oFont1:
End() oFont2:
End() oFont3:
End()RETURN NIL// --Fecha o Programa Definitivamente e Libera a Memoria RAM.FUNCTION CIERRA_TODO
() IF File
( "SILVSLOW.LOG" ) DELETEFILE
( "SILVSLOW.LOG" ) ENDIF oFont:
End() oFont40:
End() dbCommitAll
() dbUnlockAll
() dbCloseAll
() FreeResources
() RELEASE ALL
SysRefresh
() hb_gcAll
( .T.
) CLEAR MEMORY
PostQuitMessage
( 0 ) QUIT
RETURN NILSTATIC FUNCTION BmpTiled
( hDC, oWnd, oBmp
) LOCAL nWidth := oWnd:
nWidth(), nHeight := oWnd:
nHeight() LOCAL nRow :=
0, nCol :=
0, n
LOCAL nBmpWidth := oBmp:
nWidth(), nBmpHeight := oBmp:
nHeight() IF oBmp:
hBitmap ==
0 RETURN NIL ENDIF WHILE nRow < nHeight
SYSREFRESH
() nCol =
0 WHILE nCol < nWidth
PalBmpDraw
( hDC, nRow, nCol, oBmp:
hBitmap ) nCol += nBmpWidth
END
nRow += nBmpHeight
END
RETURN NILFUNCTION CAMBIAR_INDICE_SLOW
( nOpcRadioEnde, cAlias, oLbx
) LOCAL oDlg, oFont, oBrw, oSay, DBPESQ, cIndice, oSaida, nRecno, cResName
LOCAL nKey := VK_ESCAPE, nColuna :=
1, nProposta, aGrad, oBmp
cResName :=
"LUPA2" IF nOpcRadioEnde ==
5 //-> Por STATE DbSelectArea
( cAlias
) SET ORDER
TO 05 cIndice := OemToAnsi
( "STATE" ) nColuna :=
5 ELSEIF nOpcRadioEnde ==
4 //-> Por CITY DbSelectArea
( cAlias
) SET ORDER
TO 04 cIndice := OemToAnsi
( "CITY" ) nColuna :=
4 ELSEIF nOpcRadioEnde ==
3 //-> Por STREET DbSelectArea
( cAlias
) SET ORDER
TO 03 cIndice := OemToAnsi
( "STREET" ) nColuna :=
3 ELSEIF nOpcRadioEnde ==
2 //-> Por LAST DbSelectArea
( cAlias
) SET ORDER
TO 02 cIndice := OemToAnsi
( "LAST" ) nColuna :=
2 ELSEIF nOpcRadioEnde ==
1 //-> Por FIRST DbSelectArea
( cAlias
) SET ORDER
TO 01 cIndice :=
"FIRST" nColuna :=
1 ENDIF GO TOP
DBPESQ :=
ALIAS() // Master Rao, the "assembly" of xBrowse() is very slow. aGrad :=
{ { 0.30, CLR_WHITE, CLR_WHITE
},
{ 0.50, CLR_WHITE, CLR_WHITE
} } DEFINE FONT oFont
NAME "TAHOMA" SIZE 0,
-14 DEFINE DIALOG oDlg
SIZE 1000,
500 PIXEL FONT oFont ;
TITLE "FIVEWIN:-> BUSQUEDA INCREMENTAL - Ingresa lo que deseas buscar" ;
GRADIENT aGrad
oDlg:
lHelpIcon := .F.
// FIELD FIRST, LAST, STREET, CITY, STATE @
30,
10 XBROWSE oBrw
SIZE -10,
-10 PIXEL OF oDlg ;
DATASOURCE
"DBPESQ" AUTOCOLS AUTOSORT CELL LINES NOBORDER ;
HEADERS
"FIRST:",
"LAST:",
"STREET:",
"CITY:",
"STATE:" ;
FIELDS
( cAlias
)->FIRST,
( cAlias
)->LAST,
( cAlias
)->STREET, ;
( cAlias
)->CITY,
( cAlias
)->STATE
oBrw:
cTooltip :=
{ "Click Para Pegar", ;
"DADOS DO CLIENTE",
1, CLR_WHITE, CLR_HBLUE
} oBrw:
l2007 := .F.
oBrw:
nColSel := nColuna
// <n> // Mister Nages - Perfect. Cursor inicia na xBrowse() BrwColors
( oBrw
) WITH OBJECT oBrw
oBrw:
aCols[ 1 ]:
nWidth :=
60 oBrw:
lIncrFilter := .T.
// Liga o Filtro incremental oBrw:
lSeekWild := .T.
// Liga a busca incremental oBrw:
bKeyDown :=
{ |nKey|
If( nKey == VK_RETURN,
( oDlg:
End() ),
nil ) } oBrw:
bKeyChar :=
{ |nKey|
If( nKey == VK_ESCAPE,
( oBrw:
Seek( "" ), oDlg:
End() ),
nil ) } // oBrw:bLDblClick := { || cSeek := oBrw:aRow[ 2 ], oDlg:End() } oBrw:
AutoFit() // Auto ajuste / ajuste automatico do xBrowse() :
nStretchCol := STRETCHCOL_WIDEST
// Ajusta as colunas do xBrowse. oBrw:
CreateFromCode() END
@
10,
055 SAY "Ingresa lo que deseas buscar: " SIZE 120,
10 PIXEL OF oDlg ;
COLOR METRO_EMERALD, CLR_WHITE TRANSPARENT
@
10,
150 SAY oBrw:
oSeek PROMPT oBrw:
cSeek PICTURE "@!" UPDATE ;
OF oDlg
PIXEL COLOR METRO_EMERALD, CLR_WHITE
FONT oFont
SIZE 120,
10 // BORDER @
10,
270 SAY "Buscar Por: "+cIndice +
" <Back> Apagar" SIZE 150,
10 ;
PIXEL OF oDlg
COLOR METRO_EMERALD, CLR_WHITE TRANSPARENT
WITH OBJECT oBrw:
oSeek oBrw:
bLClicked :=
{ || oDlg:
End() } END
@
1.5,
5.5 SAY "<ESC>" SIZE 50,
12 PIXEL OF oDlg
COLOR METRO_EMERALD, CLR_WHITE TRANSPARENT
@
0.5,
056 BITMAP oBmp
RESOURCE cResName
SIZE 50,
50 NO BORDER
OF oDlg TRANSPARENT
oBmp:
cToolTip :=
"Pesquisa Incremental Por: " + cIndice
@
010,
005 BUTTONBMP oSaida
PROMPT( "&Salida" ) ACTION( oDlg:
End() ) ;
RESOURCE "154" TEXTRIGHT
SIZE 45,
12 PIXEL FONT oFont
OF oDlg CANCEL
oSaida:
cToolTip :=
"Saida - Exit - Cancelar" ACTIVATE DIALOG oDlg
CENTERED ;
ON INIT ( oBrw:
cSeek(""), oBrw:
SetFocus(), .F.
) oFont:
End() CLOSE
( DBPESQ
) // CLOSE FILTER - FECHO FILTRO DA XBROWSE() // REABRO O BANCO PARA REFRESCAR A LISTBOX ORIGINAL E POSICIONO O CURSOR USE SILVSLOW
ALIAS SILVSLOW
INDEX SILVSLOW
NEW SHARED
SET ORDER
TO 01 GO TOP
DBSILVSLOW :=
ALIAS() // SILVSLOW.DBF SELECT( DBSILVSLOW
) oLbx:
Refresh()RETURN NIL// Cores na xBrowsestatic function BrwColors
( oBrw, lFoot
) local cClrBack
DEFAULT lFoot := .F.
oBrw:
l2007 := .F.
oBrw:
nRowHeight :=
24 oBrw:
nHeaderHeight :=
24 oBrw:
lFooter := lFoot
//oBrw:lRecordSelector := .F. //oBrw:lColDividerComplete := .F. //oBrw:lRowDividerComplete := .F. oBrw:
lFlatStyle := .T.
oBrw:
bClrHeader :=
{ ||
{ CLR_BLACK, CLR_WHITE, CLR_WHITE
} } //RGB( 232, 255, 232 ), RGB( 232, 255, 232 ) }} oBrw:
lFullGrid := .F.
oBrw:
nRowDividerStyle := LINESTYLE_NOLINES
//DARKGRAY //LINESTYLE_LIGHTGRAY // oBrw:
nColDividerStyle := LINESTYLE_NOLINES
//LIGHTGRAY // LINESTYLE_NOLINES oBrw:
nMarqueeStyle := MARQSTYLE_HIGHLROW
oBrw:
bClrStd =
{ ||
If( oBrw:
KeyNo() %
2 ==
0, ;
{ If( ( oBrw:
cAlias )->
( Deleted
() ), CLR_HRED, CLR_BLUE
),;
RGB
( 198,
255,
198 ) }, ;
{ If( ( oBrw:
cAlias )->
( Deleted
() ), CLR_HRED, CLR_BLUE
),;
RGB
( 232,
255,
232 ) } ) } oBrw:
bClrSel =
{ ||
{ If( ( oBrw:
cAlias )->
( Deleted
() ), CLR_HRED, CLR_WHITE
),;
RGB
( 34,
177,
76 ) } } //RGB( 0x33, 0x66, 0xCC ) } } cClrBack = Eval
( oBrw:
bClrSelFocus )[ 2 ] oBrw:
bClrSelFocus :=
{ ||
{ If( ( oBrw:
cAlias )->
( Deleted
() ), CLR_HRED, CLR_WHITE
),;
cClrBack
} } oBrw:
SetColor( CLR_BLUE, RGB
( 232,
255,
232 ) ) oBrw:
SetFont( oFont1
)return nil// By Giovanny Vecchi - TESTRAD.PRG aqui na minha pasta.FUNCTION CTRLS_COLORS
( f_oDlgContainer
) LOCAL lc_aCtrls :=
{}, lc_iFor :=
0 LOCAL lc_aItemsRadio :=
{} lc_aCtrls := f_oDlgContainer:
aControls FOR lc_iFor :=
1 TO Len
( lc_aCtrls
) IF ValType
( lc_aCtrls
[lc_iFor
] ) ==
"O" IF lc_aCtrls
[lc_iFor
]:
ClassName() ==
"TRADIO" aEval
( lc_aCtrls
[lc_iFor
]:
oRadMenu:
aItems, ;
{|_oRadId|
{ SetWindowTheme
( _oRadId:
hWnd,
"",
"" ), ;
_oRadId:
SetColor( METRO_EMERALD, CLR_WHITE
) } } ) ELSEIF lc_aCtrls
[lc_iFor
]:
ClassName() ==
"TCHECKBOX" SetWindowTheme
( lc_aCtrls
[lc_iFor
]:
hWnd,
"",
"" ) lc_aCtrls
[lc_iFor
]:
SetColor( METRO_EMERALD, CLR_WHITE
) ENDIF ENDIF NEXTRETURN NIL// FIN / END - kapiabafwh@gmail.com