Page 1 of 1

PostPosted: Fri Feb 08, 2002 1:53 pm
by Dave F
Just a couple (probably stupid) questions about fields:

(1) When I'm using Fctl(INSERT, &char) to insert characters into a field, I'm trying to make the field act more like a user would expect a Windows single line text field to act. When the field is defined as multilined, when the insertion point reaches the right edge of the field, adding one more char forces a line feed and the appearance is to push the full displayed text off the left side of the field and move the insertion point all the way to the left. I believe that actually what is happening is the full text displayed in the field was pushed up and wordwrap created a new line and set the insertion point at the beginning. But to a user, it appears that the text "disappeared", rather than scrolling the text off the left side of the field char by char as more are added. Is there any way to make char by char scrolling happen and leave the insertion point at the right edge? This would be consistent with what most users are accustomed to from Windows text boxes. I tried setting the field mode to single line, and when the chars fill the field display, the insertion point stays at the right edge, but added chars do not display (even though they are stored in the field string), i.e. the text does not scroll to the left.

(2) Is there any way to tell when a field has lost focus, similar to the Windows event which reports this. This would be useful for screens with large numbers of fields since the programmer could read field inputs from users as they occur and not have to read and update data from all the fields in the form before moving to a new form.

PostPosted: Fri Feb 08, 2002 4:35 pm
by jstadolnik
1) The INSERT problem you describe only effects Fields with the single-line bit set. Due to the way the palm OS handles these fields it is not possible to scroll them them to the left. There's nothing I can do about it. (Right anchoring the field does help a bit, but the palmOS ends up screwing up the insertion point position.)

2) Yes. Setup a handler function with the Fctl REPEAT command. See the field_demo.c file for an example of this.


The PToolboxLib guy.