Define Dialog oDlg from 6, 18 To 180, 190 Of oVarGlobales : oWndMain Pixel Font oFonts1
oDlg : nStyle := nOr( WS_POPUP )
oDlg : bRClicked := { || oDlg : End() }
@ 2, 2 Group oGrupo To oDlg : nRight / 2 - 8, oDlg : nBottom / 2 - 8 Label "" Of oDlg Pixel
@ 0, 0 ListBox oLbx Fields "" Size 85, 100 Pixel Of oDlg Font oFonts
oLbx : SetArray( aPeriodos )
With Object oLbx
:bLine := { | nAt | nAt := oLbx : nAt, { Alltrim( aPeriodos[ nAt ][ 1 ] ) } }
:bFont := { | nRow, nCol, nStyle | If( nStyle == 1, oFonts3 : hFont, If( nStyle == 3 .and. ( nCol == 2 .or. nCol == 3 .or. nCol == 4 .or. nCol == 5 .or. nCol == 6 .or. nCol == 7 ), oFonts3 : hFont, ) ) }
:lDrawHeaders := .f.
:nHeaderHeight := 15
:aHJustify := { 2, 2,2,2,2 }
:aJustify := { 0 }
:nClrFFore := CLR_RED
:nLineHeight := 20
:aColSizes := { 100 }
:lCellStyle := .f.
:nClrLine := RGB( 235, 235, 235 )
:bLDblClick := { || ConmutaBase( oLbx, aPeriodos, oDlg ) }
:bKeyDown := { | nKey | If( nKey == VK_RETURN, ConmutaBase( oLbx, aPeriodos, oDlg ), ) }
:nClrPane := { || If( oLbx : nAt % 2 == 0, RGB( 245,245,245 ), RGB( 255,255,255 )) }
:nLineStyle := 5
:nHeaderStyle := 6 //If( nStyle == 3 .and. nCol == 3, CLR_BLACK, )
:nFooterStyle := 5
:bTextColor := { | nRow, nCol, nStyle | If( nStyle == 1, CLR_HEAD, ) }
//:bBkColor := { | nRow, nCol, nStyle | If( nStyle == 3 .and. nCol == 1, CLR_WHITE, ) }
End
Activate Dialog oDlg On Init( oDlg : bLostFocus := { || oDlg : End() }, oDlg : Move( oVarGlobales : oWndMain : nBottom + ( oVarGlobales : oWndMain : oMsgBar : nTop - 4 - oVarGlobales : oWndMain : oMsgBar : nBottom ) - oDlg : nHeight, oVarGlobales : oWndMain : oMsgBar : nRight - ( oDlg : nWidth + 150 ) ), Centra( oDlg ), oLbx : Refresh(), oLbx : Paint() ) Valid( oFuente1 : End(), oFuente2 : End(), oFonts : End(), oFonts1 : End(), oFonts2 : End(), oFonts3 : End(), oVarGlobales : oWndMain : SetFocus(), .t. ) NoWait