Color Input / Bootstrap, change at runtime


#1

Can’t change the color of the Input field (bootstrap) at runtime:

I tried Input1.style.color = RGB(255,0,0)
and vbRed

P.S.: At design time vbRed can’t be used, but red works.
But at runtime?

I’m using 6.2.7


#2

If the input text color is the target, I believe you’re looking for:

Input1_contents.style.color = RGB(255,0,0)

Kind regards,
Doug


#3

Hm, that’s exactly what I tried.


#4

works for me, too. Are you sure you’re entering it correctly?


#5

And you see red characters?

Using BASIC\3. Controls\Bootstrap\Input.nsx
I added this Code
Function Input1_onclick()
Input1.style.Color = RGB(255,0,0)
Input2.value = Input1.style.Color
End Function

Input2 shows #ff0000
but there’s nothing red in Input1

btw: Input1.style.color instead of .Color
Input2 shows rgb(255, 0, 0)


#6

Yes, I do. Look at dallrich’s code carefully - he typed something different than you.


#7

color in lower case !


#8

OK, _contents and color. I tried it with _contents, but with upper case Color, and that did not work.
Thank you.