× Linguagem de Programação ADVPL

Perguntas COMBOBOX e MSCOMBOBOX

Mais
6 anos 4 meses atrás #32372 por josesarto
Pessoal, bom dia!

Estou implementando uma necessidade, a qual preciso apresenta uma relação de "Status" existente em um array, utilizando COMBOBOX ou MSCOMBOBOX, porém o espação equivalente aos itens saõ apresentados, mas sem o conteúdo dos elementos do array, quando codifico conforme abaixo:
aStatusP := {}
aAdd(aStatusP , { "[CMF/MFA/IR/CSLL/ICMS]" })
aAdd(aStatusP , { "[CMF/MFA/IR] " })
aAdd(aStatusP , { "[CMF/MFA/IR/CSLL] " })
aAdd(aStatusP , { "[CMF/MFA] " })
aAdd(aStatusP , { "[CMF/ICMS] " })
aAdd(aStatusP , { "[CMF/IR] " })
aAdd(aStatusP , { "[CMF/CSLL] " })
aAdd(aStatusP , { "[CMF] " })
aAdd(aStatusP , { "[MFA] " })
aAdd(aStatusP , { "[IR] " })
aAdd(aStatusP , { "[ICMS] " })
aAdd(aStatusP , { "[CSLL] " })
aAdd(aStatusP , { "[CONFERIDO] " })

DEFINE DIALOG _oDlgS TITLE "Status Conferência" FROM 178,181 TO 310,468 PIXEL
@ 002, 001 COMBOBOX oEdit1 VAR nEditS ITEMS aStatusP SIZE 140, 013 OF _oDlgS PIXEL COLORS 0, 16777215
ou
@ 002, 001 MSCOMBOBOX oEdit1 VAR nEditS ITEMS aStatusP SIZE 140, 013 OF _oDlgS PIXEL COLORS 0, 16777215

MAS....

Quando faço o uso da segunda forma abaixo, não consigo obter a string referente ao elemento selecionado do array

@ 002, 001 MSCOMBOBOX oEdit1 VAR nEditS ITEMS {;
"[CMF/MFA/IR/CSLL/ICMS]",;
"[CMF/MFA/IR] ",;
"[CMF/MFA/IR/CSLL] ",;
"[CMF/MFA] ",;
"[CMF/ICMS] ",;
"[CMF/IR] ",;
"[CMF/CSLL] ",;
"[CMF] ",;
"[MFA] ",;
"[IR] ",;
"[ICMS] ",;
"[CSLL] ",;
"[CONFERIDO] ",;
"[PENDENTE] ";
} ;
SIZE 140, 013 OF _oDlgS PIXEL COLORS 0, 16777215

Alguém poderia me ajudar a identificar o que está ocorrendo?

Por favor Acessar ou Registrar para participar da conversa.

Mais
6 anos 4 meses atrás #32377 por admin
Respondido por admin no tópico COMBOBOX e MSCOMBOBOX
Cara tenta fazer assim:

aAdd(aStatusP , "A=[CMF/MFA/IR/CSLL/ICMS]")
aAdd(aStatusP , "B=[CMF/MFA/IR] ")
aAdd(aStatusP , "C=[CMF/MFA/IR/CSLL] ")
aAdd(aStatusP , "D=[CMF/MFA] ")
aAdd(aStatusP , "E=[CMF/ICMS] ")
aAdd(aStatusP , "F=[CMF/IR] ")
aAdd(aStatusP , "G=[CMF/CSLL] ")
aAdd(aStatusP , "H=[CMF] ")
aAdd(aStatusP , "I=[MFA] ")
aAdd(aStatusP , "J=[IR] ")
aAdd(aStatusP , "K=[ICMS] ")
aAdd(aStatusP , "L=[CSLL] ")
aAdd(aStatusP , "M=[CONFERIDO] ")


@ 002, 001 MSCOMBOBOX oEdit1 VAR cOpcao ITEMS aStatusP SIZE 140, 013 OF _oDlgS PIXEL COLORS 0, 16777215

cOpcao vai conter a Letra "A" por exemplo.

Por favor Acessar ou Registrar para participar da conversa.

Tempo para a criação da página:0.080 segundos
Joomla templates by a4joomla