VLNUNES Posted April 1, 2014 Report Share Posted April 1, 2014 Como iniciar combobox com um item já selecionado ? Por exemplo tenho cTEXTCG := {"Selecione","Alameda","Avenida","Beco","Estrada","Praça","Rodovia","Rua","Travessa"} Gostaria que ao abrir a tela o item Selecione já estivesse no combobox. Obrigado; Vander Quote Link to comment Share on other sites More sharing options...
SAOliveira Posted April 1, 2014 Report Share Posted April 1, 2014 var_do_combo:=cTEXTGG[x] Quote Link to comment Share on other sites More sharing options...
sambomb Posted April 1, 2014 Report Share Posted April 1, 2014 oCombo:Select(1) oCombo:Refresh() Quote Link to comment Share on other sites More sharing options...
Erciley Junior Posted April 1, 2014 Report Share Posted April 1, 2014 Eu sempre gosto de usar um ponteiro numérico no COMBOBOX, aí ficaria: LOCAL cTEXTCG := {"Selecione","Alameda","Avenida","Beco","Estrada","Praça","Rodovia","Rua","Travessa"} LOCAL nCombo:=1 @ 01.0,01.0 COMBOBOX obj_combo VAR nCombo ITEMS cTEXTCG OF obj_tela SIZE 70,50 Quote Link to comment Share on other sites More sharing options...
VLNUNES Posted April 1, 2014 Author Report Share Posted April 1, 2014 Obrigados a todos, Resolvido com a dica de Erciley Junior LOCAL cTEXTCG := {"Selecione","Alameda","Avenida","Beco","Estrada","Praça","Rodovia","Rua","Travessa"} LOCAL nCombo := 1 .. .. .. REDEFINE COMBOBOX oCATEGO VAR nCombo ITEMS cTEXTCG ID 101 OF CADACEPS .. .. .. Vander Quote Link to comment Share on other sites More sharing options...
Luiz Arruda (ICO) Posted April 3, 2014 Report Share Posted April 3, 2014 Sei que está resolvido mas vai uma dica. EU sempre iniciava com " " tipoAssim obriga o usuário a selecionar uma opção e não entrar com informação errada, de tanto usar fica abitual e passa sem a gente perceber, e se for "vazio" um válid avisa que a opção é obrigatória .. :: LOCAL cTEXTCG := {" ","Selecione","Alameda","Avenida","Beco","Estrada","Praça","Rodovia","Rua","Travessa"} Abraços.. 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.