steve poling wrote:
> Hi all,
> 
> When I inspect a ComboBox field under Adobe Acrobat, the dialog box has 
> checkboxes indicating whether the field is "locked" or not in the lower 
> left hand corner. Also, in the options tab thereof, there are checkboxes 
> for "sort items" and "allow user to enter custom text."
> 
> Can I use iTextSharp to control these attributes when I create fields? 
> If so, what should I use?

I assume you are making your combo box with class TextField
(which is the easiest way).
Class TextField extends class BaseField, so you can use the
method setOptions to set the options.
This method takes an int, but this integer is used as a bitset.
For instance: field.setOptions(BaseField.REQUIRED | BaseField.PASSWORD);
means you want the text in the text field to be rendered as ***
and that the field is required.
I'm not sure what is meant by 'locked', it could mean:
BaseField.READONLY or BaseField.DO_NOT_SCROLL
To allow the user to enter custom text, you should use
BaseField.EDIT

I don't think there's a flag to sort fields.
I looked it up in the PDF Reference, and this is what it says:
"This flag is intended for use by form AUTHORING tools,
not by PDF viewer applications. Viewers should simply
display the options in the order in which they occur in
the Opt array." In other words: the flag doesn't have any
meaning to a viewer application. You can work around it
by sorting the options before adding them to the field.

br,
Bruno

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to