StrataFrame Forum

Textboxes and character-values

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

By Thomas Holste - 9/15/2010

Hi there,

I found a problem today which I could solve, but I am not sure, if this is the right way, so I would like to ask you, how you have solved this.

I want my textboxes to behave like textboxes do in VFP. This means, a textbox (I am only talking about textboxes filled with string-value) is filled with the trimmed value from the table and is in insert-mode.

Now my standard-textbox ist filled with a padded value (full length of a field) and the first time I entered into a textbox I was wandering why I could type and type and nothing happened.

Then I set Autoadjustlength to False and increased maxlength. Now I could type but I like the idea of setting a maxlength for a character-field.

Then I read a bit through some threads in the forum, started the BO-Mapper and trimmed my char-fields and set the BindingUpdateMode to OnValidation. But then the field was not saved. Finally I put a little "helper-field" on the form, which receives focus in my save-method (and then hides again). Now everything is working but I am asking myself, if this is ok? How do you handle this, especially if you want to behave textboxes like the way I have described?

Best regards

Thomas
By Edhy Rijo - 9/15/2010

Hi Thomas,

I want my textboxes to behave like textboxes do in VFP. This means, a textbox (I am only talking about textboxes filled with string-value) is filled with the trimmed value from the table and is in insert-mode.

If you use Varchar field types in your tables, then it will behave as you want.  What do you mean by "insert-mode"?
By Thomas Holste - 9/15/2010

Hi Edhy,

thanks for the tip, I will try it.

By "Insert-Mode" I mean that, when entered, a character is added to the content of a field.

In Overwrite.Mode an existing character would be replaced by the new typed char.

Best regards

Thomas
By Greg McGuffey - 9/16/2010

Insert-mode is the default for most controls that take text, so that should be easy.