emotta Posted August 22, 2013 Report Share Posted August 22, 2013 Pessoal, preciso criar um efeito no Get que seja semelhante a pesquisa do facebook. Por exemplo, no campo CÓDIGO DO FUNCIONÁRIO quero que fique dentro do GET um texto opaco escrito "digite o nome para pesquisar" e ai o usuário pode digitar o código ou então digitar o nome que se faz a pesquisa. (semelhante a figura) Existe um meio de fazer isso no GET? Estou usando a ultima versão do FIVEWIN (FW 13.08) Abraços Quote Link to comment Share on other sites More sharing options...
Theotokos Posted August 22, 2013 Report Share Posted August 22, 2013 Acho que é assim, pois já vi algo aqui no forum, testa ai: REDEFINE GET oGet VAR cCodigo Id 4001 CUEBANNER "Digite o Codigo do Funcionario Aqui" Quote Link to comment Share on other sites More sharing options...
emotta Posted August 22, 2013 Author Report Share Posted August 22, 2013 Boa theotokos, isso já resolve. Porem quando o foco vai para o GET o texto some... Seria legal se ele sumisse somente após a primeira digitação da letra, mas aí vou tentar alterar a classe. Obrigado Quote Link to comment Share on other sites More sharing options...
kapiaba Posted August 22, 2013 Report Share Posted August 22, 2013 Use ON CHANGE no get para limpar somente após se digitar algo. Quote Link to comment Share on other sites More sharing options...
emotta Posted August 22, 2013 Author Report Share Posted August 22, 2013 Kapiaba, vc viu que nao me refiro ao conteudo da variavel e sim somente ao texto... Usando o método ON CHANGE nao sei como faria isso, se der pra postar um exemplo vai me ajudar... mas tem que ser usando o CUEBANNER vlw Use ON CHANGE no get para limpar somente após se digitar algo. Quote Link to comment Share on other sites More sharing options...
emotta Posted August 22, 2013 Author Report Share Posted August 22, 2013 Consegui fazer alterando o método DISPTEXT para o código abaixo: obrigado a todos ! METHOD DispText() CLASS MyGet if ::lPassword .and. ::oGet:Type == "C" #ifdef __CLIPPER__ SetWindowText( ::hWnd, Replicate( "*", Len( Trim( ::oGet:buffer ) ) ) ) #else SetWindowText( ::hWnd, Replicate( If( IsAppThemed(), Chr( 149 ), "*" ),; Len( Trim( ::oGet:buffer ) ) ) ) #endif else// SetWindowText( ::hWnd, If( ! Empty( ::cCueText );// .and. Empty( ::oGet:VarGet() );// .and. GetFocus() != ::hWnd,; // Focus is outside// "", ::oGet:buffer ) ) If Empty( ::oGet:VarGet()) .and. Empty(::oGet:buffer) SetWindowText( ::hWnd, If( ! Empty( ::cCueText ); .and. Empty( ::oGet:VarGet() ); .and. .t.,; // Focus is outside "", ::oGet:buffer ) ) Else SetWindowText( ::hWnd, If( ! Empty( ::cCueText ); .and. Empty( ::oGet:VarGet() ); .and. GetFocus() != ::hWnd,; // Focus is outside "", ::oGet:buffer ) ) EndIf endifreturn nil Theotokos 1 Quote Link to comment Share on other sites More sharing options...
joaosolution Posted August 24, 2013 Report Share Posted August 24, 2013 Emotta Boa tarde Qual é a classe get com essa opção de pesquisa já inserida no get? Att João Bosco Quote Link to comment Share on other sites More sharing options...
emotta Posted August 26, 2013 Author Report Share Posted August 26, 2013 João, a pesquisa tem que fazer na mão. No meu caso eu fiz no Valid mesmo e depois vou implementar a cada caracter digitado. Mas o que estava precisando era apenas do efeito de deixar uma mensagem escrita dentro do GET antes de iniciar a digitação, igual está na imagem acima. abraços Quote Link to comment Share on other sites More sharing options...
joaosolution Posted August 27, 2013 Report Share Posted August 27, 2013 Eduardo Estou falando do botão com a Lupa anexo no get. Att João Bosco Quote Link to comment Share on other sites More sharing options...
kapiaba Posted August 27, 2013 Report Share Posted August 27, 2013 Eduardo Estou falando do botão com a Lupa anexo no get. Att João Bosco Veja se a sua versão tem: \samples\TESTGET3.PRG Quote Link to comment Share on other sites More sharing options...
emotta Posted August 27, 2013 Author Report Share Posted August 27, 2013 Joao é a TGET padrao Eduardo Estou falando do botão com a Lupa anexo no get. Att João Bosco Quote Link to comment Share on other sites More sharing options...
joaosolution Posted August 27, 2013 Report Share Posted August 27, 2013 Eduardo Grato pela resposta! Mas não consegui acionar esta opção direto no get. Você teria algum exemplo? Att João Bosco Quote Link to comment Share on other sites More sharing options...
SAOliveira Posted August 27, 2013 Report Share Posted August 27, 2013 Acho que viajei. REDEFINE GET OWCodCfop VAR Wcodcfop Picture "@R 9.999" ID 101 OF oDlg FONT oPub:fBCour13 COLOR oPub:CorGet,oPub:CorFundoGet UPDATE BITMAP "16_LUPA" ACTION(Ctb_Cfop_Cadastro_Consulta('oDlg','Wcodcfop')) Valid(VWCodCfop()) no caso Ctb_Cfop_Cadastro_Consulta('oDlg','Wcodcfop'), é a função da busca sensitiva. Quote Link to comment Share on other sites More sharing options...
emotta Posted August 27, 2013 Author Report Share Posted August 27, 2013 Joao, tente ver o samples que o Kapiaba falou que la tem, é o TESTGET3.PRG Em todo caso a linha de comando é: @ 10,10 get oGet1 var cVar1 bitmap "..\bitmaps\on.bmp" action( msginfo( "With Transparent" ) ) of oDlg pixel size 60,12 onde BITMAP é o caminho do BMP a exibir no botao e o ACTION é a funcao que será executada ao clicar no botao Eduardo Grato pela resposta! Mas não consegui acionar esta opção direto no get. Você teria algum exemplo? Att João Bosco Quote Link to comment Share on other sites More sharing options...
joaosolution Posted August 28, 2013 Report Share Posted August 28, 2013 Eduardo e Sergio Obrigado! Funcionou blz! Att João Bosco 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.