rectcontrol enable

Hello,
i want to disable all controls on a window which works this way:

[code]
dim c as control
For i As Integer = 0 To main.ControlCount - 1
c = main.Control(i)
If c IsA RectControl then
Rectcontrol©.enabled=false
End if
Next

cmspref.Enabled=true

return true[/code]

after the for…next loop i want to enable again only one control with “cmspref.Enabled=true” but it does not getting enabled, why?

what happens after this return true?

Does the control have a parent control that is still disabled?

hmm, sure… i forgot that a containerControl is also a control and this was disabled too with the loop above so all controls on it remains disabled…

Thanks!

container controls arent rect controls and the loop would not alter their enabled / disabled state

Yet it does /shrug