Display Form - making text fields read-only?
I've tried to get in and manipulate the attribute display window or the Identify details window to show some custom results from my parcel search, but no luck so far. I thought instead that I could do a very simple form in Workflow and populate text boxes with the information I pulled from the feature class attributes. This works great, however, the form comes up as something with text boxes and values that aren't 'fixed', meaning users can get into them with a mouse and change the text. This obviously doesn't matter data-wise because they are not actually editing anything, but it is inelegant and may give them the idea that they can edit the data. I'd like to have those boxes be read-only.
There is a read-only property of the text box, so I thought I could set this the same way I am setting the defaulttext value, with a runtime modification on the form. I use an Assign, and set form.Find(Of TextBoxFormItem)("TextBox1").ReadOnly = TRUE.
Unfortunately, this doesn't work. The text boxes are still in a state where a user can manipulate the text.
Is there any way to make this work? It seems like there are very few options to create a custom window with text fields using Workflow, and I am trying to avoid digging any deeper into custom code options.
Tami O.
-
Hi Tami, The TextBox item in Display Form is an internal implementation that does not extend a .NET TextBox. This means there is no ReadOnly property for you to set. All the available properties are listed in the Properties panel of the Form Designer. If read only is important to you two things that may look better than an editable field are: 1. Use the Group item. Specify a Maximum Width that suits you. Use RuntimeModifications to populate the Description with your data. For example: form.Find(Of ContainerFormItem)("Group2").Description = "Field XYZ:" + string1 2. Use the GroupBox item. Specify a Maximum Width that suits you. Pre-populate the Header with your field name. Use RuntimeModifications to populate the Description with your data. Example: form.Find(Of GroupBoxFormItem)("GroupBox1").Description = string1 Hope that helps. -Cam 0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
1 Kommentar