gibaf Posted February 9, 2023 Report Share Posted February 9, 2023 ola a todos ! A classe Folder tem a opcao de oFolder:Enable( .T. , .F. , .T. , .F. , .T. ) entretanto... tipo, imaginem um folder, tipo, com umas 5 abas (hipoteticamente)... agora, imaginem, q por uma necessidade, algumas delas precisam estar :HIDE() e outras permanecendo :SHOW() tem com fazer com Hide/Show ? q o Enable nao me atende para o caso em questao. ate ja tentei (nao da error, mas tambem nao faz - hehe) oFolder:aDialogs[1]:Show() oFolder:aDialogs[2]:Hide() oFolder:aDialogs[3]:Show() oFolder:aDialogs[4]:Hide() oFolder:aDialogs[5]:Show() Por fim, o mais ideal q consegui fazer eh o oFolder:SetPrompts( aAba ) mas o froid q toda escolha do ComboBox (nao falei, mas antes do folder tem esse combobox q o usuario seleciona a sua opcao) tem q refazer tudo as coisas (say, get, brw, etc) seria perfeito se funcionaria o HIDE/SHOW se alguem puder me dar alguma dica, eu ficarei muito agradecido ! MUITO OBRIGADO Quote Link to comment Share on other sites More sharing options...
Theotokos Posted February 9, 2023 Report Share Posted February 9, 2023 talvez: tenta ai oFolder:aEnable[1] := .T. oFolder:aEnable[2] := .F. oFolder:aEnable[3] := .T. Quote Link to comment Share on other sites More sharing options...
gibaf Posted February 9, 2023 Author Report Share Posted February 9, 2023 8 minutos atrás, Theotokos disse: talvez: tenta ai oFolder:aEnable[1] := .T. oFolder:aEnable[2] := .F. oFolder:aEnable[3] := .T. ola... primeiramente, obrigado por responder... pois, eu nao sei vc compreendeu a minha necessidade .. o Enable nao me atende... o q me atenderia mil% seria o HIDE/SHOW obrigado +1x pela resposta Quote Link to comment Share on other sites More sharing options...
kapiaba Posted February 9, 2023 Report Share Posted February 9, 2023 Olá, Não funciona Hide()/Show(). nem com FOLDER, nem com FOLDEREX. Já reclamei com o Linãres e nada. abs. Regards, saludos. Quote Link to comment Share on other sites More sharing options...
kapiaba Posted February 9, 2023 Report Share Posted February 9, 2023 Veja com este "truque" se resolve: Teste e comente: // \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. Regards, saludos. Quote Link to comment Share on other sites More sharing options...
kapiaba Posted February 9, 2023 Report Share Posted February 9, 2023 Mais infos: http://fivetechsoft.com/forums/viewtopic.php?t=2394&highlight=esconder Regards, saludos. Quote Link to comment Share on other sites More sharing options...
giovanyvecchi Posted February 9, 2023 Report Share Posted February 9, 2023 Se quiser esconder a segunda aba seria assim oFld:aVisible := {.T.,.F.,.T.,.T.} Quote Link to comment Share on other sites More sharing options...
kapiaba Posted February 9, 2023 Report Share Posted February 9, 2023 1 hora atrás, giovanyvecchi disse: Se quiser esconder a segunda aba seria assim oFld:aVisible := {.T.,.F.,.T.,.T.} Boa garoto. Se bem que fica um "buraco" horroroso. kkkkkkkk https://forums.fivetechsupport.com/viewtopic.php?f=6&t=24099&p=129835&hilit=oFld%3AaVisible&sid=67223e9a38d3804f1ad19ff92a2151cc#p129835 Regards, saludos. Quote Link to comment Share on other sites More sharing options...
gibaf Posted February 9, 2023 Author Report Share Posted February 9, 2023 RESOLVIDO (ate q gostei do resultado, rss) Quote Link to comment Share on other sites More sharing options...
kapiaba Posted February 9, 2023 Report Share Posted February 9, 2023 Essa eu não entendi. Isso é um FOLDER? 1 ABA SÓ? Porquê não usou um diálogo normal? Quote Link to comment Share on other sites More sharing options...
gibaf Posted February 9, 2023 Author Report Share Posted February 9, 2023 5 minutos atrás, kapiaba disse: Essa eu não entendi. Isso é um FOLDER? 1 ABA SÓ? Porquê não usou um diálogo normal? kkk... nao... nao eh folder... eh dialog mesmo (no andar do desenvolvimento larguei de lado o q pensei indicio de ser folder...kkk Quote Link to comment Share on other sites More sharing options...
kapiaba Posted February 9, 2023 Report Share Posted February 9, 2023 20 minutos atrás, gibaf disse: kkk... nao... nao eh folder... eh dialog mesmo (no andar do desenvolvimento larguei de lado o q pensei indicio de ser folder...kkk kkkkkk, JESUS! Tranquilo. c num tá bem! kkkkkk abs; Regards, saludos. Quote Link to comment Share on other sites More sharing options...
Theotokos Posted February 9, 2023 Report Share Posted February 9, 2023 é foldeuuuuuuuuuu kkkkkkkkkkkkkkkkkkkkkkkkkkkkkk Quote Link to comment Share on other sites More sharing options...
Ladinilson Posted February 9, 2023 Report Share Posted February 9, 2023 Quando ele disse "RESOLVIDO" já ia copiar e colar no meu sistema também, ai fiquei olhando e pensei..."que porra é essa já?" kkkkkkkkkkkkkkkkkkkk Quote Link to comment Share on other sites More sharing options...
gibaf Posted February 9, 2023 Author Report Share Posted February 9, 2023 kkkk Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.