A.J Posted January 12, 2016 at 03:37 PM Report Share #591885 Posted January 12, 2016 at 03:37 PM Olá á todos. Estou com alguns problemas e falta de funções(acredito que seja isso o principal). Preciso verificar se dentro do combobox o Selected item 0 foi trocado para o item Selected item 2 e bloquear isso, tipo assim "Você não pode selecionar o item 2 quando o estiver no item 0" ou não mostrar o item 2. Link to comment Share on other sites More sharing options...
Retsu9 Posted January 12, 2016 at 03:41 PM Report Share #591887 Posted January 12, 2016 at 03:41 PM nao te consegues explicar um bocado melhor e contextualizar mais a situação ? Link to comment Share on other sites More sharing options...
He B TeMy Posted January 12, 2016 at 04:10 PM Report Share #591889 Posted January 12, 2016 at 04:10 PM Só queres que o utilizador selecione um valor sem poder mudar? Se sim, usa: Private Sub comboBox1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles combobox.SelectedIndexChanged comboBox1.Enabled = False End Sub Link to comment Share on other sites More sharing options...
A.J Posted January 12, 2016 at 04:25 PM Author Report Share #591890 Posted January 12, 2016 at 04:25 PM Acho que não fui muito claro, talvez o pt-br atraplhe um pouco. Mas vamos lá! O usuário quando for lançar um despesa no programa ele vai ter que selecionar no combobox se está pago, não pago e Quantia X, porém eu quero que só mostre quantia x, quando ele for alterar a despesa, criei duas private sub, uma para lançar e outra para alterar e eu só quero na de alterar, entendes? Obrigado pelo suporte Link to comment Share on other sites More sharing options...
He B TeMy Posted January 12, 2016 at 04:31 PM Report Share #591891 Posted January 12, 2016 at 04:31 PM dim alterardespesa as boolean = false if alterardespesa Then combobox.items.remove("pago") combobox.items.remove("não pago") End If Não dá para esconder ou desativar só um item na combobox, tens de remover/adicionar. Link to comment Share on other sites More sharing options...
A.J Posted January 12, 2016 at 05:10 PM Author Report Share #591893 Posted January 12, 2016 at 05:10 PM Hm,pode ser esse o problema, não estou em casa mas quando eu chegar vou tentar ver e se consigo alguma outra forma de fazer compreender essa funcão Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now