Necesito cambiar el font del titulo de un folder (de los dialogos)
:oFld:adialgos[1]:OFONT...
Como lo hago?
gracias.
:oFld:adialgos[1]:OFONT...
// \samples\testfx6.prg
#include "FiveWin.ch"
STATIC oFont, oFnt, oFont1, oFont2, oFont3, oFont4
function main()
local oWnd, i, oBrush2
local oFld
DEFINE BRUSH oBrush2 FILE "..\bitmaps\backgrnd\metal.bmp"
DEFINE FONT oFont NAME "Ms Sans Serif" SIZE 00, -10 BOLD
DEFINE FONT oFnt NAME "Ms Sans Serif" SIZE 00, -12 BOLD
DEFINE FONT oFont1 NAME "Calibri" SIZE 0, -14 BOLD
DEFINE FONT oFont2 NAME "Segoe UI Light" SIZE 0, -16 BOLD
DEFINE FONT oFont3 NAME "Segoe UI" SIZE 0, -18 BOLD
DEFINE FONT oFont4 NAME "Ms Sans Serif" SIZE 00, -8 BOLD
DEFINE WINDOW oWnd TITLE "TFolderex - Testing -"
@ 3, 3 FOLDEREX oFld PIXEL ADJUST;
PROMPT "&Social", "&OS", "&Games", "&Movies", "&Email", "Mo&nths", "Se&tting", "E&xit";
ON PAINT TAB PaintTab( Self, nOption ) ;
ON CHANGE CAMBIA_FONTE( Self, nOption ) ;
ON PAINT TEXT( If( nOption == ::nOption .and. nOption == 2, CLR_BLUE, CLR_BLACK ) );
TOP OPTION 2 ALIGN 2, 2, 2
@ 5, 140 BUTTONBMP PROMPT "" BITMAP "..\bitmaps\bartop.bmp" OF oFld:aDialogs[ 2 ] PIXEL;
ACTION ( oFld:SetLayOut( 1 ) )
@ 105, 140 BUTTONBMP PROMPT "" BITMAP "..\bitmaps\barDown.bmp" OF oFld:aDialogs[ 2 ] PIXEL;
ACTION ( oFld:SetLayOut( 3 ) )
@ 55, 80 BUTTONBMP PROMPT "" BITMAP "..\bitmaps\barleft.bmp" OF oFld:aDialogs[ 2 ] PIXEL;
ACTION ( oFld:SetLayOut( 2 ) )
@ 55, 200 BUTTONBMP PROMPT "" BITMAP "..\bitmaps\barright.bmp" OF oFld:aDialogs[ 2 ] PIXEL;
ACTION ( oFld:SetLayOut( 4 ) )
oFld:aDialogs[ 2 ]:SetBrush( oBrush2 )
// oFld:aDialogs[ 02 ]:Hide() // No funciona
ACTIVATE WINDOW oWnd ;
ON INIT( oFld:Resize(), oFld:aDialogs[ 02 ]:Hide() ) // no funciona
RETURN NIL
FUNCTION CAMBIA_FONTE( o, nOption )
IF nOption == o:nOver .OR. nOption == o:nOption
IF nOption == 8
o:SetFont( oFont2 )
ELSEIF nOption == 7
o:SetFont( oFont1 )
ELSEIF nOption == 6
o:SetFont( oFont )
ELSEIF nOption == 5
o:SetFont( oFnt )
ELSEIF nOption == 4
o:SetFont( oFont4 )
ENDIF
ENDIF
RETURN( .T. )
FUNCTION PaintTab( o, nOption )
LOCAL hBrush, hBmp, nLastRow
IF nOption == o:nOver .OR. nOption == o:nOption
o:SetAlphaLevel( nOption, 255 )
ELSE
o:SetAlphaLevel( nOption, 50 )
ENDIF
IF nOption == o:nOption .and. nOption == 2
hBmp = ReadBitmap( 0, "..\bitmaps\backgrnd\metal.bmp" )
hBrush = CreatePatternBrush( hBmp )
DeleteObject( hBmp )
IF o:nLayOut == 2
nLastRow = o:aPos[ o:aLines[ o:aOrder[ 1 ] ][ 1 ] ][ 1 ] + o:nFolderHeight
SetBrushOrgEx( o:hDC, nLastRow + 2, 1 )
ELSE
SetBrushOrgEx( o:hDC, 2, 2 )
ENDIF
RETURN hBrush
ENDIF
RETURN o:SetFldColors( o, nOption )
// fin / end
goosfancito wrote:Hola.
FolderEX estoy teniendo problemas lo deje de usar. no me deja cambiar entre DIALOGOS
Return to FiveWin para Harbour/xHarbour
Users browsing this forum: No registered users and 51 guests