Luiz Arruda (ICO) Posted August 26, 2005 Report Share Posted August 26, 2005 Num adianta mandar eu ver outros tópicos que já fiz isso como faço p/ deixar issu ai embaixo COR SIM, COR NAO, COR SIM COR NAO - zebrado é possÃvel em Listbox @S.. ?? DEFINE DIALOG ODLG FROM 06,05 TO 44,130 TITLE ":: Visualização de Relatório" COLOR "W+/W" @02,07 to 10,04 of odlg @02,10 listbox fields; size 358,250; on left DBLCLICK tstexclui(odlg, .f.) ; OF oDlg @03,05 sbutton oprn resource "bmp_ALTERA","bmp_ALTERA2" prompt "&alterar" size 45,25 of odlg @06,05 sbutton oprn resource "bmp_marca","bmp_desmarca" prompt "&Desmarca" size 45,25 of odlg; action reca() @09,05 sbutton oprn resource "bmp_EXCLUIR","bmp_EXCLUIR1" prompt "&Excluir" size 45,25 of odlg; action tstexclui() @12,05 sbutton oprn resource "bmp_sair3","bmp_sair2" prompt "&Sair" size 45,25 of odlg; message "teste"; ACTION ODLG:END() ACTIVATE DIALOG ODLG centered pack RETURN NIL Abraços.. VOCÊ NAO PODE PERDER: 3º ENCONTRO DE FIVEWINNERS NOVEMBRO DE 2005 Luiz Arruda - iko67@ibest.com.br FW 2.4 Clipper 5.2 WS Quote Link to comment Share on other sites More sharing options...
Luiz Arruda (ICO) Posted August 26, 2005 Author Report Share Posted August 26, 2005 Num adianta mandar eu ver outros tópicos que já fiz isso como faço p/ deixar issu ai embaixo COR SIM, COR NAO, COR SIM COR NAO - zebrado é possÃvel em Listbox @S.. ?? DEFINE DIALOG ODLG FROM 06,05 TO 44,130 TITLE ":: Visualização de Relatório" COLOR "W+/W" @02,07 to 10,04 of odlg @02,10 listbox fields; size 358,250; on left DBLCLICK tstexclui(odlg, .f.) ; OF oDlg @03,05 sbutton oprn resource "bmp_ALTERA","bmp_ALTERA2" prompt "&alterar" size 45,25 of odlg @06,05 sbutton oprn resource "bmp_marca","bmp_desmarca" prompt "&Desmarca" size 45,25 of odlg; action reca() @09,05 sbutton oprn resource "bmp_EXCLUIR","bmp_EXCLUIR1" prompt "&Excluir" size 45,25 of odlg; action tstexclui() @12,05 sbutton oprn resource "bmp_sair3","bmp_sair2" prompt "&Sair" size 45,25 of odlg; message "teste"; ACTION ODLG:END() ACTIVATE DIALOG ODLG centered pack RETURN NIL Abraços.. VOCÊ NAO PODE PERDER: 3º ENCONTRO DE FIVEWINNERS NOVEMBRO DE 2005 Luiz Arruda - iko67@ibest.com.br FW 2.4 Clipper 5.2 WS Quote Link to comment Share on other sites More sharing options...
Luiz Arruda (ICO) Posted August 26, 2005 Author Report Share Posted August 26, 2005 Num adianta mandar eu ver outros tópicos que já fiz isso como faço p/ deixar issu ai embaixo COR SIM, COR NAO, COR SIM COR NAO - zebrado é possÃvel em Listbox @S.. ?? DEFINE DIALOG ODLG FROM 06,05 TO 44,130 TITLE ":: Visualização de Relatório" COLOR "W+/W" @02,07 to 10,04 of odlg @02,10 listbox fields; size 358,250; on left DBLCLICK tstexclui(odlg, .f.) ; OF oDlg @03,05 sbutton oprn resource "bmp_ALTERA","bmp_ALTERA2" prompt "&alterar" size 45,25 of odlg @06,05 sbutton oprn resource "bmp_marca","bmp_desmarca" prompt "&Desmarca" size 45,25 of odlg; action reca() @09,05 sbutton oprn resource "bmp_EXCLUIR","bmp_EXCLUIR1" prompt "&Excluir" size 45,25 of odlg; action tstexclui() @12,05 sbutton oprn resource "bmp_sair3","bmp_sair2" prompt "&Sair" size 45,25 of odlg; message "teste"; ACTION ODLG:END() ACTIVATE DIALOG ODLG centered pack RETURN NIL Abraços.. VOCÊ NAO PODE PERDER: 3º ENCONTRO DE FIVEWINNERS NOVEMBRO DE 2005 Luiz Arruda - iko67@ibest.com.br FW 2.4 Clipper 5.2 WS Quote Link to comment Share on other sites More sharing options...
marcelo Posted August 26, 2005 Report Share Posted August 26, 2005 Ola oLbx:nClrPane := {|| IF( (oLbx:cAlias)->( OrdKeyNo() ) % 2 == 0, rgb(168,211,255), rgb(255,255,255) )} Yrece Quote Link to comment Share on other sites More sharing options...
Luiz Arruda (ICO) Posted August 26, 2005 Author Report Share Posted August 26, 2005 Certo mais em qual linha eu coloco ?? deve ser isso que nao dá certo. Obrigado VOCÊ NAO PODE PERDER: 3º ENCONTRO DE FIVEWINNERS NOVEMBRO DE 2005 Luiz Arruda - iko67@ibest.com.br FW 2.4 Clipper 5.2 WS Quote Link to comment Share on other sites More sharing options...
marcelo Posted August 26, 2005 Report Share Posted August 26, 2005 Ola Function ???? Local Olbx @ 01,10 Listbox olbx fields; size 358,250; on left DBLCLICK tstexclui(odlg, .f.) ; OF oDlg oLbx:nClrPane := {|| IF( (oLbx:cAlias)->( OrdKeyNo() ) % 2 == 0, rgb(168,211,255), rgb(255,255,255) )} @03,05 sbutton oprn resource "bmp_ALTERA","bmp_ALTERA2" prompt "&alterar" size 45,25 of odlg @06,05 sbutton oprn resource "bmp_marca","bmp_desmarca" prompt "&Desmarca" size 45,25 of odlg; action reca() @09,05 sbutton oprn resource "bmp_EXCLUIR","bmp_EXCLUIR1" prompt "&Excluir" size 45,25 of odlg; action tstexclui() @12,05 sbutton oprn resource "bmp_sair3","bmp_sair2" prompt "&Sair" size 45,25 of odlg; message "teste"; ACTION ODLG:END() ACTIVATE DIALOG ODLG Yrece Quote Link to comment Share on other sites More sharing options...
Luiz Arruda (ICO) Posted August 27, 2005 Author Report Share Posted August 27, 2005 Boa tarde.. nao deu veja o erro que dá error base/1070 argument error: == ... .. . tsbutton:new(329) e mais outras relacionadas ao Tsbutton. sóque eu tirar a linha oLbx:nClrPane := {|| IF( (oLbx:cAlias)->( OrdKeyNo() ) % 2 == 0, rgb(168,211,255), rgb(255,255,255) )} funciona normalmente.hae tem que tirar ordkeyNo() e por recno() o que é este ordkeyno() ??, e pq dá o erro de == Abraços VOCÊ NAO PODE PERDER: 3º ENCONTRO DE FIVEWINNERS NOVEMBRO DE 2005 Luiz Arruda - iko67@ibest.com.br FW 2.4 Clipper 5.2 WS Quote Link to comment Share on other sites More sharing options...
Geraldo (gbsilva) Posted August 27, 2005 Report Share Posted August 27, 2005 ICO eu acho que OrdKeyno() tem que ser com Clipper 5.3, no inÃcio tive esse problema e acho que só consegui com o 5.3. Geraldo Barbosa da Silva FW 2.6 + Clipper 5.3b + Blinker 6.0 + WS 4.5 FWH 2.6 + xHarbour 0.99.50 (Simplex) + Bcc55 + Pelles + MyMake Windows Xp SP2 lucgera@terra.com.br Quote Link to comment Share on other sites More sharing options...
Kbelo Posted August 27, 2005 Report Share Posted August 27, 2005 bom nao vi oque voce esta tentando colocar em seu list box mas se for um vetor faça assim oLbx:nClrPane := {|| IIF(oLbx:nat/2==int(oLbx:nat)/2,cor1,cor2 )} ou seja pegue a linha divide por 2 se for igual a o inteiro dele mesmo fica cor1 senao cor2 Quote Link to comment Share on other sites More sharing options...
marcelo Posted August 28, 2005 Report Share Posted August 28, 2005 Ola Ico, uso xharbour comercial e compilei seu exemplo juntamente com a classe tsbutton, funcionou normalmente,o unico detalhe foi o posicionamento dos botoes quase dentro do listbox.Como não tenho as funçoes reca e a tstexclui criei-as com retorno .T. Outro detalhe.Pelo que vi, a função tstexclui, serve para deletar registro, neste caso quando voce deleta, mesmo dando refresh, o proximo registro daquele deletado ficará com a mesma cor,para que isso não aconteça deve-se colocar na hora de indexar o arquivo o seguinte: index on xx for !deleted() to xx1. Yrece Quote Link to comment Share on other sites More sharing options...
vagner Posted August 28, 2005 Report Share Posted August 28, 2005 Olá O OrdKeyNo() é igual ao Recno(), porém com uma diferença, o Recno() é a posição do registro no dbf e o OrdKeyNo() é a posição do registro no CDX, no NTX, não têm essa função, se vc está trabalhando com array use o nAt do próprio browse, tipo assim : oLbx:nClrPane := {|| IF( oLbx:nAt % 2 == 0, rgb(168,211,255), rgb(255,255,255) )} Vagner Wirts Clipper 5.2 Lib 5.3 - Blinker 5.0 FW 2.0, Harbour 43.0 (Flex), xHarbour 99.1 99.2 99.3 (Simplex) FW 2.5 Quote Link to comment Share on other sites More sharing options...
marcelo Posted August 28, 2005 Report Share Posted August 28, 2005 Ola Ico, uso xharbour comercial e compilei seu exemplo juntamente com a classe tsbutton, funcionou normalmente,o unico detalhe foi o posicionamento dos botoes quase dentro do listbox.Como não tenho as funçoes reca e a tstexclui criei-as com retorno .T. Outro detalhe.Pelo que vi, a função tstexclui, serve para deletar registro, neste caso quando voce deleta, mesmo dando refresh, o proximo registro daquele deletado ficará com a mesma cor,para que isso não aconteça deve-se colocar na hora de indexar o arquivo o seguinte: index on xx for !deleted() to xx1. Yrece Quote Link to comment Share on other sites More sharing options...
Luiz Arruda (ICO) Posted August 29, 2005 Author Report Share Posted August 29, 2005 Bom dia Pessoal. Nao deu Nada. Se ponho recno(), da o erro == se coloco ordkeyNo(), nem compila, se coloco assim ODLG:nClrPane := {|| IF( ODLG:nAt % 2 == 0, rgb(168,211,255), rgb(255,255,255) )} da o errinho abaixo. =========== Called from LOCKERRHAN(0) Called from (b)INITHANDL$(0) Called from (b)NEW(0) Called from ASCAN(0) Called from TBRUSH:NEW(0) Called from TSBUTTON:SETCOLOR(0) Called from TSBUTTON:NEW(300) Called from VISUAL(26) Called from (b)MAINN(62) Called from TSBUTTON:LBUTTONDOW(1100) Called from TSBUTTON:HANDLEEVEN(0) Called from TSBUTTON:HANDLEEVEN(1007) Called from WINRUN(0) Called from TWINDOW:ACTIVATE(0) Called from MAINN(86) Abraços VOCÊ NAO PODE PERDER: 3º ENCONTRO DE FIVEWINNERS NOVEMBRO DE 2005 Luiz Arruda - iko67@ibest.com.br FW 2.4 Clipper 5.2 WS Quote Link to comment Share on other sites More sharing options...
marcelo Posted August 29, 2005 Report Share Posted August 29, 2005 Ola Mandei para seu email as libs do Clipper 5.3b para voce fazer outro teste. Yrece Quote Link to comment Share on other sites More sharing options...
Kbelo Posted August 29, 2005 Report Share Posted August 29, 2005 coloque seu listbox assim eu garanto que funciona REDEFINE LISTBOX oBrwIni ; FIELDS vlinha[oBrwIni]; HEADERS " "; Font Load_Obj(4); ID 101 OF oDlgINI oBrwIni:nat = 1 oBrwIni:bGoTop = { || oBrwIni:nat := 1 } oBrwIni:bGoBottom = { || oBrwIni:nat := Eval( oBrwIni:bLogicLen ) } oBrwIni:bSkip = { | nWant, nOld | nOld := oBrwIni:nat, oBrwIni:nat += nWant, oBrwIni:nat := Max( 1, Min( oBrwIni:nat, Eval( oBrwIni:bLogicLen ) ) ),oBrwIni:nat - nOld } oBrwIni:bLogicLen = { || Len( vlinha ) } oBrwIni:nClrPane := { || Zebrinha(oBrwIni:nat,"Array") } *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*= Static Function Zebrinha(pos,tipo,ind,Cor1,Cor2) *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*= x:=pos / 2 y:=Int(x) Z:=x-y IF Z = 0 If Cor1 # NIL nClr := Cor1 Else nClr := 16771288 Endif Else If Cor2 # NIL nClr := Cor2 Else nClr := 15794175 Endif Endif Return Marcelo Michels Alexandre Criciúma - SC Celo.michels@ibestvip.com.br marcelo@lorenzi.com.br Quote Link to comment Share on other sites More sharing options...
Luiz Arruda (ICO) Posted August 29, 2005 Author Report Share Posted August 29, 2005 Ola. Aos dois Marcelos Yrece - Com as lib. do 5.3 Nao deu . Kbela - Quero fazer isso com ListBox @Say Nao sei porque que não está dando certo. Abraço´s VOCÊ NAO PODE PERDER: 3º ENCONTRO DE FIVEWINNERS NOVEMBRO DE 2005 Luiz Arruda - iko67@ibest.com.br FW 2.4 Clipper 5.2 WS Quote Link to comment Share on other sites More sharing options...
Kbelo Posted August 29, 2005 Report Share Posted August 29, 2005 defina seu list box com @ .... e depois coloque oBrwIni:nat = 1 oBrwIni:bGoTop = { || oBrwIni:nat := 1 } oBrwIni:bGoBottom = { || oBrwIni:nat := Eval( oBrwIni:bLogicLen ) } oBrwIni:bSkip = { | nWant, nOld | nOld := oBrwIni:nat, oBrwIni:nat += nWant, oBrwIni:nat := Max( 1, Min( oBrwIni:nat, Eval( oBrwIni:bLogicLen ) ) ),oBrwIni:nat - nOld } oBrwIni:bLogicLen = { || Len( vlinha ) } oBrwIni:nClrPane := { || Zebrinha(oBrwIni:nat,"Array") } *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*= Static Function Zebrinha(pos,tipo,ind,Cor1,Cor2) *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*= x:=pos / 2 y:=Int(x) Z:=x-y IF Z = 0 If Cor1 # NIL nClr := Cor1 Else nClr := 16771288 Endif Else If Cor2 # NIL nClr := Cor2 Else nClr := 15794175 Endif Endif Return use o oBrwIni:nat para indivar a linha corrente ou voce pode tentar assim se for um temporario no zebrinha() faça if int(recno()/2)==recno()/2 retorna cor1 else retorna cor 2 endif e use somente o Clrpane esquece o resto Marcelo Michels Alexandre Criciúma - SC Celo.michels@ibestvip.com.br marcelo@lorenzi.com.br Quote Link to comment Share on other sites More sharing options...
Luiz Arruda (ICO) Posted August 29, 2005 Author Report Share Posted August 29, 2005 Marcelo. desculpe ficar perturbando. Mais nao deu certo Veja abaixo e se nao for pedir muito monte p/ mim pq. não é possivel que não dá certo. Alguma coisa tô fazendo errado. Abraços --- LOCAL ODLG SELECT 1 USE DIARIO ALIAS DIARIO EXCLUSIVE NEW set index to c:\dados\diapag DEFINE DIALOG ODLG FROM 01,01 TO 44,130 @02,10 listbox fields; size 358,250; on left DBLCLICK (odlg, .f.) ; OF oDlg oDLG:nClrPane := { || Zebrinha(oDLG:nat,"Array") } ACTIVATE DIALOG ODLG CENTER RETURN static function sebrinha.... VOCÊ NAO PODE PERDER: 3º ENCONTRO DE FIVEWINNERS NOVEMBRO DE 2005 Luiz Arruda - iko67@ibest.com.br FW 2.4 Clipper 5.2 WS Quote Link to comment Share on other sites More sharing options...
pauloaraujo Posted August 29, 2005 Report Share Posted August 29, 2005 citação:Bom dia Pessoal. Nao deu Nada. Se ponho recno(), da o erro == se coloco ordkeyNo(), nem compila, se coloco assim ODLG:nClrPane := {|| IF( ODLG:nAt % 2 == 0, rgb(168,211,255), rgb(255,255,255) )} da o errinho abaixo. =========== Called from LOCKERRHAN(0) Called from (b)INITHANDL$(0) Called from (b)NEW(0) Called from ASCAN(0) Called from TBRUSH:NEW(0) Called from TSBUTTON:SETCOLOR(0) Called from TSBUTTON:NEW(300) Called from VISUAL(26) Called from (b)MAINN(62) Called from TSBUTTON:LBUTTONDOW(1100) Called from TSBUTTON:HANDLEEVEN(0) Called from TSBUTTON:HANDLEEVEN(1007) Called from WINRUN(0) Called from TWINDOW:ACTIVATE(0) Called from MAINN(86) Abraços VOCÊ NAO PODE PERDER: 3º ENCONTRO DE FIVEWINNERS NOVEMBRO DE 2005 Luiz Arruda - iko67@ibest.com.br FW 2.4 Clipper 5.2 WS id=quote>id=quote>Ico, Não é ODLG:nClrPane e sim oLbx:nClrPane Paulo/CONTATO SISTEMAS Clipper53b / FW26 / Blinker70 Ajudar é um prazer, agradecer é uma obrigação PRESTIGIEM O III ENCONTRO DE USUÃRIOS DE FIVEWIN - 2005 Quote Link to comment Share on other sites More sharing options...
Kbelo Posted August 30, 2005 Report Share Posted August 30, 2005 bom voce nao tem a variavel objeto(eu chamo assim) do seu list box e tambem nao tem nada no fields tente assim vamos supor que exite o campo Cod_Diario no arquivo Diario entao ficaria assim @02,10 listbox olbx fields DIARIO->Cod_Diario size 358,250; on left DBLCLICK (odlg, .f.) ; OF oDlg olbx:nClrPane := { || Zebrinha(olbx:nat,"Array") } ACTIVATE DIALOG ODLG CENTER RETURN static function sebrinha.... veja aqui tambe a Função esta com 'S' seria com 'Z' (Zebrinha) tambe esse size esta ai somente para dar erro pois voce nao tem nenhum dado no listbox voce deve usar o mesmo numero de campos no fields(Campos), Headers(cabeçalho), e qualquer outro que tenha um certo dado para cada item Marcelo Michels Alexandre Criciúma - SC Celo.michels@ibestvip.com.br marcelo@lorenzi.com.br Quote Link to comment Share on other sites More sharing options...
Luiz Arruda (ICO) Posted August 30, 2005 Author Report Share Posted August 30, 2005 PAULO. FIZ COM oLbx como vc. disse e olha o erro ai. Error description: Error Objects/8 No Object Msg.: UNDEFINED:_NCLRPANE Stack Calls =========== Called from LOCKERRHAN(0) Called from (b)INITHANDL$(0) Called from _NCLRPANE(0) Called from ZEBRA(333) Called from (b)MAINN(74) Called from TSBUTTON:LBUTTONDOW(1356) Called from TSBUTTON:HANDLEEVEN(0) Called from TSBUTTON:HANDLEEVEN(1256) Called from WINRUN(0) Called from TWINDOW:ACTIVATE(0) Called from MAINN(95) Kbelo. Vou testar seu exemplo depois retorno. E qto a Sebrinha, foi apenas um erro de digitação, eu tava digitando aqui mesmo no tópico. só p/ dar uma idéia de como eu tava fazendo, no meu prg ta escrito certo E QTO. AOS DADOS DO LISTBOX NAO DEFINI PORQUE NECESSITO QUE TODOS ELES APARECEM NA TELA, NO MODO LISTBOX NORMAL (FUNDO BRANCO) TA FUNCIONANDO NORMAL. ISSO FAZ DIFERENÇA ?, bem vou testar o ex. acima e já já retorno. PS: este exemplo funciona para qq versao do FW ???. ABRAÇOS VOCÊ NAO PODE PERDER: 3º ENCONTRO DE FIVEWINNERS NOVEMBRO DE 2005 Luiz Arruda - iko67@ibest.com.br FW 2.4 Clipper 5.2 WS Quote Link to comment Share on other sites More sharing options...
marcelo Posted August 30, 2005 Report Share Posted August 30, 2005 Ola Ico, mandei para seu email um exemplo pratico feito em fivewin+clipper (prg,dbf,bat,lnk,exe).De uma olhada Yrece Quote Link to comment Share on other sites More sharing options...
betovsp Posted August 30, 2005 Report Share Posted August 30, 2005 Yrece, eu utilizo a tsbrowse e até hoje não consegui mudar essas cores, por mais que utilize todas as respostas aqui do forum não funciona, vc pode me enviar esse exemplo?? Abraços. Beto betovsp@hotmail.com (16)9148-1515 CL53B + FW2.0 + @ SAY + BLINKER 7 Ribeirão Preto/SP III ENCONTRO DE FIVEWINERS -> ESSE EU NÃO PERCO Quote Link to comment Share on other sites More sharing options...
marcelo Posted August 30, 2005 Report Share Posted August 30, 2005 Ola Beto, este exemplo está no meu computador em casa.mande um email para: trench@protestodeosasco.com.br me lembrando, quando chegar em casa mando para voce Yrece Quote Link to comment Share on other sites More sharing options...
Luiz Arruda (ICO) Posted August 30, 2005 Author Report Share Posted August 30, 2005 Yrece Bom Dia. Recebi seu exemplo, executei o exe e vi que era exatamente o que eu quero fazer. compilei o exemplo. com o clipper 5.2e compilou normalmente mais ao dar o blinker @.. nao reconheceu o ordkeyNo() e ordkeycout. Onde eu acho o CLIPPER 5.3 p/ ver se funciona ??. Abraços. VOCÊ NAO PODE PERDER: 3º ENCONTRO DE FIVEWINNERS NOVEMBRO DE 2005 Luiz Arruda - iko67@ibest.com.br FW 2.4 Clipper 5.2 WS 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.