dotNetControl TextBox lost text formating when change enabled state.
hello,
I actually trying tu use the dotnet Textbox, But i encounter a problem, when i change his enabled state, the TextBox lost text formating, As you can see in the short code bellow.
Do you know an alternative that can keep formatting when textbox is disable? (or may be i made a mistake..)
Thanks
rollout rolTest "Test" ( dotNetControl custtxt "System.Windows.Forms.TextBox" pos:[16,25] width:240 height:144 checkbox actcc "active/desactive" pos:[17,200] width:232 height:16 checked:false on rolTest open do ( custtxt.Multiline = true; custtxt.ScrollBars = custtxt.ScrollBars.vertical; custtxt.text = "blzaezijfnai afarfijnazf \r\n DFZAFEAZFd" ) on actcc changed theState do ( if actcc.checked == true then ( custtxt.enabled = false ) else ( custtxt.enabled = true ) ) ) createDialog rolTest 400 400 <code>
Comments
...
Yep. This is the thing with .net. Instead of "Enable" propertie you can use "ReadOnly" if you want to preserve formatting.
BTW is not only the problem with textbox, also others ctrls where you can edit text or some values have same problem.
bga
nice! i had found this very
nice!
i had found this very usefull guide:
http://www.scriptspot.com/bobo/mxs9/dotNet/dotNetObject_System.Windows.F...
thanks again ;)
...
That is the old post. Maybe is better to look here
http://msdn.microsoft.com/en-us/library/system.windows.controls.textbox..... Also if you want to know more about .net properties, methods and events use this tool by Alexander Kramer http://www.scriptspot.com/3ds-max/scripts/show-dotnet-properties
bga
thanks
thanks