PMSF Posted July 25, 2012 at 09:22 AM Report Share #470209 Posted July 25, 2012 at 09:22 AM bom dia, tenho um conjunto de botões no formulário, e necessitava de fazer referencia a cada um deles para (por exemplo) mudar a côr de fundo. a minha questão é: é possivel fazer algo com o For... Next estava a pensar algo do genero: For Cada = 1 to 20 Botao(cada).backcolor = white Next é possivel?! desde já, obrigado... 🙂 Link to comment Share on other sites More sharing options...
Caça Posted July 25, 2012 at 09:31 AM Report Share #470213 Posted July 25, 2012 at 09:31 AM Com um For Each é mais fácil, faz um a todos os controlos do formulário e verifica se o seu tipo é botão, se sim altera a cor de fundo. Pedro Martins Não respondo a duvidas por PM Link to comment Share on other sites More sharing options...
PMSF Posted July 25, 2012 at 10:08 AM Author Report Share #470217 Posted July 25, 2012 at 10:08 AM (edited) excelente!!!! ficou assim: For Each btn As Control In frmCalendario.PainelMensal.Controls If TypeOf btn Is Button Then 'codigo para o botão End If Next Edited July 25, 2012 at 11:11 AM by ribeiro55 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