Tengo un folder, quiero HIDE un dialogo

Tengo un folder, quiero HIDE un dialogo

Postby goosfancito » Wed Mar 02, 2022 10:20 pm

Hola.
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.
FWH 21.02
Harbour 3.2.0dev (r2104281802)
Copyright (c) 1999-2021, https://harbour.github.io/
User avatar
goosfancito
 
Posts: 1954
Joined: Fri Oct 07, 2005 7:08 pm

Re: Tengo un folder, quiero HIDE un dialogo

Postby groiss » Thu Mar 03, 2022 6:28 am

Buenos dias, compañero:
Prueba con esto:
Code: Select all  Expand view  RUN

oFld:aEnable[2]:=.f.
 


Esto no lo oculta, pero le impide al usuario entrar en él.
Saludos
groiss
 
Posts: 225
Joined: Tue Sep 01, 2009 7:55 am
Location: Plasencia - ESPAÑA

Re: Tengo un folder, quiero HIDE un dialogo

Postby ender » Thu Mar 03, 2022 9:39 am

prueva com
::oFld:aDialogs[ 02 ]:odlg:hide()
ender
 
Posts: 30
Joined: Sat Apr 15, 2006 11:25 pm

Re: Tengo un folder, quiero HIDE un dialogo

Postby Antonio Linares » Thu Mar 03, 2022 12:44 pm

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

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42107
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Tengo un folder, quiero HIDE un dialogo

Postby jbrita » Thu Mar 03, 2022 3:48 pm

yo lo hago asi:

Local aFolder

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

oFld:aEnable:= aFolder

Saludos
jbrita
 
Posts: 502
Joined: Mon Jan 16, 2006 3:42 pm

Re: Tengo un folder, quiero HIDE un dialogo

Postby karinha » Thu Mar 03, 2022 3:52 pm

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


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

Code: Select all  Expand view  RUN

// \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
karinha
 
Posts: 7828
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: Tengo un folder, quiero HIDE un dialogo

Postby goosfancito » Thu Mar 03, 2022 8:38 pm

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
goosfancito
 
Posts: 1954
Joined: Fri Oct 07, 2005 7:08 pm

Re: Tengo un folder, quiero HIDE un dialogo

Postby karinha » Thu Feb 09, 2023 3:57 pm

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


Code: Select all  Expand view  RUN

// \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: 7828
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: Tengo un folder, quiero HIDE un dialogo

Postby karinha » Thu Feb 09, 2023 4:14 pm

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

Re: Tengo un folder, quiero HIDE un dialogo

Postby karinha » Thu Feb 09, 2023 5:41 pm

No me gusta, más...

Code: Select all  Expand view  RUN

    oFld:aVisible := {.T.,.F.,.T.,.T.}
 


Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7828
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 36 guests