Panel Enabled

  • Thread starter Thread starter Agnes
  • Start date Start date
A

Agnes

my panel got 10 buttons,
Iwant to disable 8 but enabled 2 buttons.
myPanel.Enabled = false
button3.enabled = true
button6.enabled = true

I found that button3 &button6 cannot be enabled = true, Anybody know why ??
I don't understand ..
 
Ya got buttons on a panel
Ya disable the panel - the buttons on it get disabled - just what one
expects
put the button you want enabled on a different panel - or disable the
buttons and not the panel
 
Agnes,

You disable the panel, not the controls on the panel for that you have to
use the control array from that by instance roughly typed here again watch
typos
\\\
For each ctr as control in panel1.controls
if typeof ctr Is button then
ctr.disable
end if
next
///

I thought that disable Buttons have a side effect that seems to be in
Windows.

I am not sure however I thought that it was that when click on it when it is
disabled and it has focus, it will fire when you enable it again, so check
that if that goes right with you.

I hope this helps?

Cor
 
Dear Cor,
I use the following method, and disable all the buttons first... and
then enabled two buttons..
Thanks
 
Cor Ligthert said:
\\\
For each ctr as control in panel1.controls
if typeof ctr Is button then
ctr.disable
end if
next
///

That is fantastic. I've been looking for an easy way to iterate through an
unknown (variable) group of controls.
 

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