Set the stretch property of an ImageFormItem
I have some documentation from the Advanced Workflow Forms class, but there is little to nothing about how to use the Stretch property of an ImageFormItem.
I have a form with an image on top and on bottom, and a text Markdown in between. I would like the images to be centered over the top and bottom of the text block, but they end up at the left side because the text is wider than both images. To center I would like to try stretching the images to the width of the group box they are in, but I am not sure how to do this.
I assumed during Runtime Modification of the form:
Form.Find(Of ImageFormItem)("Image1").Stretch = Stretch.Fill (or one of the other options)
However, Workflow Designer does not like this:
Compiler error(s) encountered processing expression 'Form.Find(Of ImageFormItem)("Image1").Stretch'. Invalid L-Value expression: Reference expressions cannot end with Conversion. The provided expression's type must match the type T of VisualBasicReference<T> or LambdaReference<T>.
This is Greek to me, as I am not a formal programmer. There is no Form.Find(Of ImageFormItem)("Image1").Stretch.Value or similar that I can see using Intellisense.
Any ideas? There has to be an easier way to center an image on a form.
0
-
"Invalid L-Value expression" means that the computer didn't like something in the "left value", ie the left-hand side of the expression or in your case "Form.Find(Of ImageFormItem)("Image1").Stretch"
"Reference expressions cannot end with Conversion." seems to me to mean that the computer doesn't understand what to do with ".Stretch" so I looked at the ImageFormItem (https://docs.geocortex.com/essentials/gvh/2.9/api-help/classes/_essentials_amd_d_._geocortex_forms_items_imageformitem_.imageformitem.html) documentation and don't see a stretch property or method... which makes me wonder where you got it from, intellisense? Anyway, I don't know the answer to your question but I do see a ".width" property which may prove fruitful to you. Good luck.
PS Intellisense is convenient but not really the best way to find out what you can do with a class, I'd bookmark the api at https://docs.geocortex.com/essentials/gvh/2.9/api-help/0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
1 Kommentar