Wednesday, March 28, 2012

Tab and Enable

Hello

I′m using the tab component and i would like to know how can i disable all the controls inside a tab automatically avoding editing.

Best regards,

Borja

could you not just loop through all the controls in the tabcontainer?

for each ctl as Control in tabcontainer.controls

ctl.enable=false

next

?


What′s the difference between enable and visible in the tab?


I believe enable=false will just gray out the tab and make it unselectable, where as visible=false will make it disappear completely.


Put all the controls you want to disable in a panel for example, and disable the panel? All the controls inside it will be disabled..


As he said, disabled controls (enabled=false) will be grayed out, while controls with visible=false will not be visible at all for the user. Which is also not the same as using style="display:none;" nor style="visibility:hidden;"... If you are gonna toggle between hiding and showing stuff, I recommend the last techniques as you can show/hide simply with css. (don't use style="", but rather define it in css if possible)

No comments:

Post a Comment