c# - Cannot set WordWrap option on TextBox inside TabControl -
i have textbox added each new tab control tab page gets created @ runtime. properties set (e.g. multiline, etc), when try access textbox coedbehind there no option it. how set wordwrap on or off when it's inside tabcontol's tabpage?

the controls collection typed collection of control objects. need cast returned control textbox first:
textbox textbox = tabcontrol1.selectedtab.controls[0] textbox; if (textbox != null) { textbox.wordwrap = true; }
Comments
Post a Comment