Max text lenght input

I’m using version Servoy 7.2.0 and now is possible to set the max text lenght input for text dataproviders.
I need to set the max lenght at runtime, is it possible?
(of course the length is limited by the length of the dbcolumn)
How can I realize that?
Does anyone have any code examples?
Thanks a lot!
Stefania

Is this web- or smartclient?

both smart and web.