Valdir Posted April 19, 2018 Report Share Posted April 19, 2018 Bom dia... Existe algum comando que atualize o o valor de uma ComboBox ? O Refresh() não funfa. Ao realizar uma Venda, preciso identificar se um o produto tem insidência do FCP - Fundo de Combate a Pobreza. Caso afirmativo, recupero o percentual conforme a aliquota da UF de Destino, caso contrário informo o valor Zero. DEFINE DIALOG...... REDEFINE GET aGet[01] VAR mCOB PICTURE "@!" ID 101 OF aDlg; COLORS CLR_BLUE, CLR_CREME VALID(NOTVAZIO(mCOB1,"Codigo do Produto")) UPDATE aGet[1]:cToolTip = OemToAnsi("Pressione F2 para Pesquisar o Arquivo de Produtos") aGet[1]:bKeyDown := { | nKey | IIF( nKey = VK_F2, PSQPRO(@mFCP,@mFUNDOCP,aDlg,oCbx), ) } REDEFINE COMBOBOX oCbx[5] VAR mFCP ; ITEMS { OemToAnsi("Sim"),; OemToAnsi("Nao")}; ID 310 OF aDlg ; COLORS CLR_BLUE, CLR_CREME UPDATE RETURN(NIL) //----------------------------------------------------------------------// STATIC FUNCTION PSQPRO(mFCP,mFUNDOCP,aDlg,oCbx) ....... ....... ....... IF PRODUTOS->FUNDOCP=0 mFCP:=1 ELSE mFCP:=2 ENDIF oCbx[5]:REFRESH(.T.) aDlg:UPDATE() RETURN(.T.) Após a pesquisa do Produto acima, a combobox deveria ser atualizada conforme o valor da varável mFCP Isso não ocorre. Alguém saberia o porquê e como resolver isso ? Obrigado. Quote Link to comment Share on other sites More sharing options...
vagner Posted April 19, 2018 Report Share Posted April 19, 2018 Bom dia Valdir, Set() oCbc[5]:Set(mCFP) Valdir 1 Quote Link to comment Share on other sites More sharing options...
Valdir Posted April 19, 2018 Author Report Share Posted April 19, 2018 Meu estimado amigo Vagner Wirts... Obrigado por responder. Funcionou certinho. Muito Obrigado. Abração. Quote Link to comment Share on other sites More sharing options...
kapiaba Posted April 19, 2018 Report Share Posted April 19, 2018 oCbc[5]:VARPUT(mCFP) oCbc[5]:Refresh() Valdir 1 Quote Link to comment Share on other sites More sharing options...
kapiaba Posted April 19, 2018 Report Share Posted April 19, 2018 Tente também: oCbc[5]:VARPUT(mCFP) ou: oCbc:Setitems(mCFP) oCbc:Update() oCbc[5]:Refresh() Valdir 1 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.