PDA

View Full Version : Creating Templates


Unregistered
October 11, 2002, 17:42:12
Hi,

I am trying to create a "Template" documents like the "Quotes" vb sample.

I have run into a bunch of issues:

1. If I call FieldInsert method two times consequently, sometimes the second field is not inserted. Also, sometimes text typed after FieldInsert becomes part of the field. What am I doing wrong here?

2. I placed 5 fields in my document. I want to set program variable values as values for these fields. How can I do that? FieldData works only for the current field!

3. I want to "Protect" the entire document except these 5 fields. How can I do that?

4. When the user enters a field, how can I specify that the field's contents should be replaced by whatever is being keyed?

Thanks

- AV


This message was originally posted by Ashutosh Varshney in the old TX Text Control Support Forum.

Björn Meyer
October 14, 2002, 13:41:32
Hello Ashutosh

1. Ensure that the second field is not inserted in another field, which is not possible. So, the current input positon should be outside of an existing field. Insert a second character input position before and after the field using the FieldEditAttributes.

2. You can set the current field using the FieldCurrent and set after that the FieldData values using your application variables.

3. You can use for rest of the text also fields which can be made unchangeable using the FieldChangeable property.

4. Check if you are currently in a field. If the user enters a field (FieldEntered) you can select the whole field (SelStart/SelLength), so that the new text will be the FieldText.

Björn Meyer, TX Text Control


This message was originally posted by Björn Meyer in the old TX Text Control Support Forum.