StrataFrame Forum

Setting the maximum chars in a textbox

http://forum.strataframe.net/Topic23767.aspx

By Aaron Young - 7/7/2009

Hi,



Is there an easy way of setting the maximum number of characters allowed in a text box based on the field length? I know I can set this manually by using the textbox MaxLength field but it is a little bit of a chore and I am lazy Smile



Has anyone come up with a way of doing this automatically?



Thanks in advance,



Aaron


By Trent L. Taylor - 7/8/2009

Actually, in the upcoming 1.7 build, this has been added the the SF textbox. There is a property called AutoAdjustMaxLength on the textbox that will do this for you when using SF data binding.



But for reference purposes, you can do this on a BO:



Dim maxLength As Integer = MyBO.FieldLengths("MyFieldName")




or in C#



int maxLength = MyBO.FieldLengths["MyFieldName"];
By Aaron Young - 7/8/2009

Nice Smile



Any idea on when the 1.7 build will be released?



Aaron
By Trent L. Taylor - 7/8/2009

We've gone ahead and added some new controls (DateBox, Calendar Control, and ExtendedCalenderManager) as well as several new beta controls that we are using in our medical application but will not be "officially" released until 1.7.1. That is what the hold-up has been as well as trying to get a number of requested enhancements in (including this one). So we are basically down to the docs which will require a little effort. So the goal is within the next two weeks.
By Edhy Rijo - 7/8/2009

Hi Trent,



Those are really great news. Tongue
By Trent L. Taylor - 7/8/2009

Yeah, they are well tested and long-awaited controls. The DateBox is a superb date entry control and is light-years better than the DateTimePicker that comes with .NET. Enhancements will most likely ensue, but we have been using it for a year now and it supports globalization values, etc. The ListView control coming out will continue to grow as we are still writing it (I am adding group functionality today), but it has features that the standard ListView never will. So lots of fun things are going to start being released! BigGrin