controls quiestion

  • Thread starter Thread starter Nikolay Petrov
  • Start date Start date
N

Nikolay Petrov

How to do something to all controls of same type in a form?
Let's for all TextBox-es.
 
Nikolay,

When they are direct on a windowform than it can be something as
\\\
for each ctr as control in me.controls
if typeof ctr = textbox then
ctr.backcolor = SystemColors.Highlight
end if
next
///
However this newsgroup is full of all kind of alternatives when the textbox
is by instance on a panel.

I hope this helps?

Cor
 
I get:
'TextBox' is a type in 'Forms' and cannot be used as an expression.
at: ctr = textbox
 
doh,

Nicolay, what an error
if typeof ctr Is textbox then

Sorry

Cor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top