fabin01 Posted November 19, 2009 Report Share Posted November 19, 2009 Galera estou com a seguinte duvida tenho algusn gets na tela que coloquei para iniciar inviisiveis e quando for clicado no radiobutton vai ativar o grupo correspondente dos gets porem nao estou conseguindo fazer, tentei com on change e on click mas nao consegui... vou colocar o codigo aqui para vcs tentarem em ajudar Local cRadio3:="" Local cRadio4:="" Local oget14[15] Local emp1,Label1,DtaI1,DtaF1,emp2,Label2,DtaI2,DtaF2,emp3,Label3,DtaI3,DtaF3,Label4,Label5,Label6 Define Dialog oDLG27 RESOURCE "SELECIONA_GERAL_ATENDIMENTO" Title "Atendimentos" Redefine Get oGet14[1] Var emp1 ID 4016 of oDLG27 when(.f.) Redefine Get oGet14[2] Var Label1 ID 4018 of oDLG27 Redefine Get oGet14[3] Var DtaI1 picture "99/99/9999" ID 4013 of oDLG27 Redefine Get oGet14[4] Var DtaF1 picture "99/99/9999" ID 4014 of oDLG27 Redefine Get oGet14[5] Var Label2 ID 4015 of oDLG27 Redefine ButtonBMP obnt3 prompt ""; ID 4017 of oDLG27 Redefine Get oGet14[6] Var emp2 ID 4021 of oDLG27 when(.f.) Redefine Get oGet14[7] Var Label3 ID 4023 of oDLG27 Redefine Get oGet14 Var DtaI2 picture "99/99/9999" ID 4012 of oDLG27 Redefine Get oGet14[9] Var DtaF2 picture "99/99/9999" ID 4019 of oDLG27 Redefine Get oGet14[10] Var Label4 ID 4020 of oDLG27 Redefine ButtonBMP obnt4 prompt ""; ID 4022 of oDLG27 Redefine Get oGet14[11] Var emp3 ID 4027 of oDLG27 when(.f.) Redefine Get oGet14[12] Var Label5 ID 4029 of oDLG27 Redefine Get oGet14[13] Var DtaI3 picture "99/99/9999" ID 4024 of oDLG27 Redefine Get oGet14[14] Var DtaF3 picture "99/99/9999" ID 4025 of oDLG27 Redefine Get oGet14[15] Var Label6 ID 4026 of oDLG27 Redefine ButtonBMP obnt5 prompt ""; ID 4028 of oDLG27 Redefine Radio oRad Var cRadio3 ID 4002,4003,4004,4005 of oDLG27 Redefine Radio oRad Var cRadio4 ID 4008,4009,4010,4011 of oDLG27 on change (Revela_Gets()) Redefine ButtonBMP obtn1 prompt "Emitir"; ID 4006 of oDLG27 Redefine ButtonBMP obnt2 prompt "Cancelar"; Action oDLG27:end(); ID 4007 of oDLG27 Activate Dialog oDLG27; on Init Gets_Invisiveis(oGet14,obnt3,obnt4,obnt5); CENTERED Function Revela_Gets(cRadio3,cRadio4,oGet14,obnt3,obnt4,obnt5) IF cRadio4 == 1 MSGINFO("TESTE") ELSEIF cRadio4 == 2 oGet14[1]:Show() oGet14[2]:Show() oGet14[3]:Show() oGet14[4]:Show() oGet14[5]:Show() obnt3:Show() ELSEIF cRadio4 == 3 oGet14[6]:Show() oGet14[7]:Show() oGet14:Show() oGet14[9]:Show() oGet14[10]:Show() obnt4:Show() ELSEIF cRadio4 == 4 oGet14[11]:Show() oGet14[12]:Show() oGet14[13]:Show() oGet14[14]:Show() oGet14[15]:Show() obnt5:Show() ENDIF Return .t.id=code>id=code>valews Obrigado pela ATENÇÃO e AJUDA! "O homem deve criar as oportunidades e não somente encontrá-las." Fábio Igor (BH-MG) fabio.igor@hotmail.com Iniciante FWH 2.8 [x]Harbour 9.61 xdev 0.70 Pelles C Editado por - fabin01 on 19/11/2009 15:54:34 Quote Link to comment Share on other sites More sharing options...
fabin01 Posted November 19, 2009 Author Report Share Posted November 19, 2009 Galera estou com a seguinte duvida tenho algusn gets na tela que coloquei para iniciar inviisiveis e quando for clicado no radiobutton vai ativar o grupo correspondente dos gets porem nao estou conseguindo fazer, tentei com on change e on click mas nao consegui... vou colocar o codigo aqui para vcs tentarem em ajudar Local cRadio3:="" Local cRadio4:="" Local oget14[15] Local emp1,Label1,DtaI1,DtaF1,emp2,Label2,DtaI2,DtaF2,emp3,Label3,DtaI3,DtaF3,Label4,Label5,Label6 Define Dialog oDLG27 RESOURCE "SELECIONA_GERAL_ATENDIMENTO" Title "Atendimentos" Redefine Get oGet14[1] Var emp1 ID 4016 of oDLG27 when(.f.) Redefine Get oGet14[2] Var Label1 ID 4018 of oDLG27 Redefine Get oGet14[3] Var DtaI1 picture "99/99/9999" ID 4013 of oDLG27 Redefine Get oGet14[4] Var DtaF1 picture "99/99/9999" ID 4014 of oDLG27 Redefine Get oGet14[5] Var Label2 ID 4015 of oDLG27 Redefine ButtonBMP obnt3 prompt ""; ID 4017 of oDLG27 Redefine Get oGet14[6] Var emp2 ID 4021 of oDLG27 when(.f.) Redefine Get oGet14[7] Var Label3 ID 4023 of oDLG27 Redefine Get oGet14 Var DtaI2 picture "99/99/9999" ID 4012 of oDLG27 Redefine Get oGet14[9] Var DtaF2 picture "99/99/9999" ID 4019 of oDLG27 Redefine Get oGet14[10] Var Label4 ID 4020 of oDLG27 Redefine ButtonBMP obnt4 prompt ""; ID 4022 of oDLG27 Redefine Get oGet14[11] Var emp3 ID 4027 of oDLG27 when(.f.) Redefine Get oGet14[12] Var Label5 ID 4029 of oDLG27 Redefine Get oGet14[13] Var DtaI3 picture "99/99/9999" ID 4024 of oDLG27 Redefine Get oGet14[14] Var DtaF3 picture "99/99/9999" ID 4025 of oDLG27 Redefine Get oGet14[15] Var Label6 ID 4026 of oDLG27 Redefine ButtonBMP obnt5 prompt ""; ID 4028 of oDLG27 Redefine Radio oRad Var cRadio3 ID 4002,4003,4004,4005 of oDLG27 Redefine Radio oRad Var cRadio4 ID 4008,4009,4010,4011 of oDLG27 on change (Revela_Gets()) Redefine ButtonBMP obtn1 prompt "Emitir"; ID 4006 of oDLG27 Redefine ButtonBMP obnt2 prompt "Cancelar"; Action oDLG27:end(); ID 4007 of oDLG27 Activate Dialog oDLG27; on Init Gets_Invisiveis(oGet14,obnt3,obnt4,obnt5); CENTERED Function Revela_Gets(cRadio3,cRadio4,oGet14,obnt3,obnt4,obnt5) IF cRadio4 == 1 MSGINFO("TESTE") ELSEIF cRadio4 == 2 oGet14[1]:Show() oGet14[2]:Show() oGet14[3]:Show() oGet14[4]:Show() oGet14[5]:Show() obnt3:Show() ELSEIF cRadio4 == 3 oGet14[6]:Show() oGet14[7]:Show() oGet14:Show() oGet14[9]:Show() oGet14[10]:Show() obnt4:Show() ELSEIF cRadio4 == 4 oGet14[11]:Show() oGet14[12]:Show() oGet14[13]:Show() oGet14[14]:Show() oGet14[15]:Show() obnt5:Show() ENDIF Return .t.id=code>id=code>valews Obrigado pela ATENÇÃO e AJUDA! "O homem deve criar as oportunidades e não somente encontrá-las." Fábio Igor (BH-MG) fabio.igor@hotmail.com Iniciante FWH 2.8 [x]Harbour 9.61 xdev 0.70 Pelles C Editado por - fabin01 on 19/11/2009 15:54:34 Quote Link to comment Share on other sites More sharing options...
joaosolution Posted November 19, 2009 Report Share Posted November 19, 2009 Fábio Vc deve alterar na chamada da função: Redefine Radio oRad Var cRadio4 ID 4008,4009,4010,4011 of oDLG27 on change (Revela_Gets(cRadio3,cRadio4,oGet14,obnt3,obnt4,obnt5)) Att João Bosco Clip 5.3b FW 2.8 FWH 2.8 xHb 1.1.0 WorkShop 4.5 PellesC SQLLIB Quote Link to comment Share on other sites More sharing options...
fabin01 Posted November 19, 2009 Author Report Share Posted November 19, 2009 citação:Fábio Vc deve alterar na chamada da função: Redefine Radio oRad Var cRadio4 ID 4008,4009,4010,4011 of oDLG27 on change (Revela_Gets(cRadio3,cRadio4,oGet14,obnt3,obnt4,obnt5)) Att João Bosco Clip 5.3b FW 2.8 FWH 2.8 xHb 1.1.0 WorkShop 4.5 PellesC SQLLIB id=quote>id=quote>ah tinha me esquecido de fazer a referencia deles na funçao... agora ta ok obrigado Obrigado pela ATENÇÃO e AJUDA! "O homem deve criar as oportunidades e não somente encontrá-las." Fábio Igor (BH-MG) fabio.igor@hotmail.com Iniciante FWH 2.8 [x]Harbour 9.61 xdev 0.70 Pelles C Quote Link to comment Share on other sites More sharing options...
kapiaba Posted November 19, 2009 Report Share Posted November 19, 2009 Basta colocar a variavel do RADIO, como STATIC, que voce controla em QUALQUER parte do seu MODULO. Exemplo: STATIC nOpcaoRadio := 1 //-> Op‡Æo do Radio da Pesquisa //--------------------------------------------------------------------------// // Edicao dos dados //--------------------------------------------------------------------------// FUNCTION CONVENIO( DeOndeVem ) LOCAL oRadMenu //-> Para Trocar o Indice da ListBox REDEFINE RADIO oRadMenu VAR nOpcaoRadio ID 201, 202 OF oDlg ; COLOR CLR_BROWN, CLR_MARROM ; ON CHANGE( TROCA_INDICE( nOpcaoRadio, cAlias, oLbx ), ; oLbx:GoTop(), oLbx:Refresh(), oLbx:SetFocus() ) id=code>id=code>Abraços. João Santos - São Paulo. kmt_karinha@pop.com.br joao@pleno.com.br Fone: (11) 3106-2832 / 8243-5632 FWH 2.7 - xHARBOUR 0.99.61 - WorkShop.Exe 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.