# Webengine edit_field question



## larrycook99 (Jul 30, 2010)

I am trying to use an "edit_field" in my webengine UI. The default color for the input is black. I want to change it to a different color and supposedly the "text_color" property is supposed to do that but it is not for me. What I have is:

	f:row {
					fill_horizontal = 1,
					spacing = f:label_spacing(),
					f:static_text {
						place_horizontal = '.15,
						title = "Test Numeric Input Field",
						text_color = LrColor("light gray"),
					},
					f:edit_field {
						place_horizontal = '.95,
						value = bind "metadata.groupTest.value",
						min = 1,
						max = 1'',
						precision = ',
						width_in_digits = 3,
						alignment = 'right',
						text_color = LrColor("light gray"),
					},
				},

"text_color" works in changing the color of the text in the "static_text" but does nothing for the "edit_field" text. Why not? Isn't it supposed to? All of the other properties for the "edit_field" work as I expect except "text_color". Can someone explain why or what I might be doing wrong?


----------



## johnbeardy (Jul 30, 2010)

Don't you have to write it LrColor (', '.7, '.7) ?


----------



## larrycook99 (Jul 30, 2010)

According to the Lightroom API, LrColor() "can be called with a variety of parameters

  * LrColor(): Creates a nil color with red, green, blue, and alpha set to '.
  * LrColor( r, g, b, a ): Creates an RGB color with red, green, blue and alpha values.
  * LrColor( r, g, b ): Creates an RGB color with red, green, and blue values. Alpha is set to 1.'
  * LrColor( l, a ): Creates a color with the given grayscale and alpha values.
  * LrColor( l ): Creates a color with the given grayscale value and 1.' as the alpha.
  * LrColor( name ): Creates a color with the given name. Values can be "black", "white", "gray", "light gray", "dark gray", "red", "green", "blue", "cyan", "yellow", "magenta", "orange", "purple", "brown"
  * LrColor( name, a ): Creates a color with the given name and alpha value."

and I have tried most of these combinations. 

Also from my example, it works for "static_text" just not for "edit_field".


----------



## johnbeardy (Jul 30, 2010)

OK, then I don't do much web engine stuff - I prefer proper database driven web sites


----------



## larrycook99 (Jul 30, 2010)

The thing is that this should not be specific to webengines. The "edit_field" is a generic plugin control and therefore should act the same for any plugin where it is used.


----------



## johnbeardy (Jul 30, 2010)

Which is why I took a guess. I don't know if it'll work the same way in the built-in panels.


----------



## larrycook99 (Jul 30, 2010)

Gottcha.

To me, one of two things are happening:

1) For some reason the "text_color" property works somewhat differently for "edit_field" and that difference is not obvious, at least to me.

OR

2) It is a bug.

I am hoping it is #1 and the answer just alludes me at the moment and someone can show me the way. If it is #2, then I hope someone can confirm that so I can stop beating my head against that particular wall.


----------



## johnbeardy (Jul 30, 2010)

You're fishing in a very limited pool of knowledge. Sean would probably know this.


----------

