Tengo un folder, quiero HIDE un dialogo

Post Reply
User avatar
goosfancito
Posts: 1955
Joined: Fri Oct 07, 2005 7:08 pm

Tengo un folder, quiero HIDE un dialogo

Post by goosfancito »

Hola.
He intentado con esto:

Code: Select all | Expand

     ::oFld:aDialogs[ 02 ]:hide()

pero no me lo oculta, hay alguna manera de "ocultar" un determinado "dialog" de un folder?

gracias.
FWH 21.02
Harbour 3.2.0dev (r2104281802)
Copyright (c) 1999-2021, https://harbour.github.io/
groiss
Posts: 228
Joined: Tue Sep 01, 2009 7:55 am
Location: Plasencia - ESPAÑA
Has thanked: 1 time

Re: Tengo un folder, quiero HIDE un dialogo

Post by groiss »

Buenos dias, compañero:
Prueba con esto:

Code: Select all | Expand


oFld:aEnable[2]:=.f.
 


Esto no lo oculta, pero le impide al usuario entrar en él.
Saludos
ender
Posts: 30
Joined: Sat Apr 15, 2006 11:25 pm

Re: Tengo un folder, quiero HIDE un dialogo

Post by ender »

prueva com
::oFld:aDialogs[ 02 ]:odlg:hide()
User avatar
Antonio Linares
Site Admin
Posts: 42395
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 10 times
Been thanked: 41 times
Contact:

Re: Tengo un folder, quiero HIDE un dialogo

Post by Antonio Linares »

::oFld:aDialogs[ 02 ]:Hide()
regards, saludos

Antonio Linares
www.fivetechsoft.com
jbrita
Posts: 506
Joined: Mon Jan 16, 2006 3:42 pm

Re: Tengo un folder, quiero HIDE un dialogo

Post by jbrita »

yo lo hago asi:

Local aFolder

aFolder := { .t.,.t.,.t.,.t.,.f.,.f.,.t.,.t. }

oFld:aEnable:= aFolder

Saludos
User avatar
karinha
Posts: 7910
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil
Been thanked: 3 times
Contact:

Re: Tengo un folder, quiero HIDE un dialogo

Post by karinha »

Antonio Linares wrote:::oFld:aDialogs[ 02 ]:Hide()


Master Antônio, con FOLDEREX, esto no funciona.

Code: Select all | Expand


// \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
 


Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
goosfancito
Posts: 1955
Joined: Fri Oct 07, 2005 7:08 pm

Re: Tengo un folder, quiero HIDE un dialogo

Post by goosfancito »

Antonio
con el folder comun tampoco me funciona, es el mismo código que probe yo.
FWH 21.02
Harbour 3.2.0dev (r2104281802)
Copyright (c) 1999-2021, https://harbour.github.io/
User avatar
karinha
Posts: 7910
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil
Been thanked: 3 times
Contact:

Re: Tengo un folder, quiero HIDE un dialogo

Post by karinha »

goosfancito wrote:Antonio
con el folder comun tampoco me funciona, es el mismo código que probe yo.

Code: Select all | Expand

// \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
 
Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
Posts: 7910
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil
Been thanked: 3 times
Contact:

Re: Tengo un folder, quiero HIDE un dialogo

Post by karinha »

João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
Posts: 7910
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil
Been thanked: 3 times
Contact:

Re: Tengo un folder, quiero HIDE un dialogo

Post by karinha »

No me gusta, más...

Code: Select all | Expand

    oFld:aVisible := {.T.,.F.,.T.,.T.}
 
Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
Post Reply