He intentado con esto:
- Code: Select all Expand view RUN
- ::oFld:aDialogs[ 02 ]:hide()
pero no me lo oculta, hay alguna manera de "ocultar" un determinado "dialog" de un folder?
gracias.
::oFld:aDialogs[ 02 ]:hide()
oFld:aEnable[2]:=.f.
Antonio Linares wrote:::oFld:aDialogs[ 02 ]:Hide()
// \samples\testfx4.prg
#include "FiveWin.ch"
function main()
local oWnd, i, oBrush2
local oFld
DEFINE BRUSH oBrush2 FILE "..\bitmaps\backgrnd\metal.bmp"
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 ( If( nOption == 8, If( MsgYesNo( "Do you want exit??" ), ;
oWnd:End(), ( ::SetOption( nOldOption ), ::Refresh() ) ), ) );
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 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:Antonio
con el folder comun tampoco me funciona, es el mismo código que probe yo.
// \samples\testfx4.prg
#include "FiveWin.ch"
function main()
local oWnd, i, oBrush2
local oFld
DEFINE BRUSH oBrush2 FILE "..\bitmaps\backgrnd\metal.bmp"
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 ( If( nOption == 8, If( MsgYesNo( "Do you want exit??" ), ;
oWnd:End(), ( ::SetOption( nOldOption ), ::Refresh() ) ), ) );
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( ESCONDE_FOLDER( oFld ) )
// ON INIT( oFld:Resize(), oFld:aDialogs[ 02 ]:Hide() ) // no funciona
RETURN NIL
STATIC FUNCTION ESCONDE_FOLDER( oFld )
oFld:aEnable := { .T., .T., .F., .T., .T., .T., .T., .T., .F. } //-> Inibe as Orelhas(Abas)
oFld:nOption := 3 // "Games"
oFld:DelItem()
// oFld:aDialogs[3]:Hide() // Nao funciona
oFld:SetOption(2)
oFld:Refresh()
oFld:SetFocus()
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
oFld:aVisible := {.T.,.F.,.T.,.T.}
Return to FiveWin para Harbour/xHarbour
Users browsing this forum: No registered users and 36 guests