Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Just fill the textbox please.

Avatar

Level 4

Simple one, but I can't find it in the reference. I've seen it before, though. The image attached illustrates what I need. When the page is a colored background, I want to fill with a different color JUST the text box where the user inputs data, not the entire text box object. I'm searching for the JavaScript code which allows for the fill of that portion of the textbox only.

Thanks!

Graham

0 Replies

Avatar

Level 7

I had this same issue in the past and simply separated the caption from the fill field. I've found this to be the most flexible method because it gives you complete freedom to do what you will having them as separate objects. I know this isn't the exact answer you're looking for but over time I've found it to be soooo much easier to work with.

Avatar

Level 10

Hi Graham,

Uploaded is an example, in which you can see the code:

.ui.#textEdit.border.fill.color

Basically you are accessing the .ui of hte object. You will need to replace textEdit with the appropriate version depending on the object type. The full list is at the end of the code.

Good luck,

Niall

Avatar

Level 4

DJ,

Yes, I know what you mean. I've been doing that up till now, but I'm trying to cut down on the number of objects in this large form in an effort to increase responsiveness.

Niall, I understand what and why you did what you did, but I just want the text box to be white all the time, without it changing color. It would seem that would be as simple as something like "this.(value/color/whatever) = "255,255,255";"

Is there something so simple?

Graham

Avatar

Level 10

Sorry Graham,

I was over-complicating the problem.

You can place fill in the "user entered" space by selecting the object and going to the Object / Field tab. Select "custom" from the appearance drop down and then set the fill to solid and the colour to white.

Hope that helps,

Niall

Avatar

Level 4

Thanks for your input, Niall, but I suppose I'll just go back to breaking the text out into it's own separate text box. Often, my background colors change, and it's too much of a hassle to input the correct color(s).

It'd be great if Adobe did an overhaul of the color palette area of LC to be more in keeping with the look and functionality of programs like Photoshop.

Thanks,

Graham

Avatar

Level 10

Hi Graham,

If you follow those steps then you can achieve the "yes" effect in your screen shot.

The caption area is transparent (and therefore will show the background colour), whereas the value area is solid colour.

Having separate text fields for the captions leads to other problems such as alignment and screen readers.

All you have to do is set the value area fill colour to white in the Object /Field tab and you will have the effect you want. You can even select several objects are apply this in one hit.


I would stick with the captions...  example attached...

N.

ps ignore the script in the object, just look at the custom appearance.

Avatar

Level 4

OK, Niall, I'll give it a go.

Thanks, and have a good weekend. I'm heading to Nashville Tennessee to hear some music this weekend.

Graham

Avatar

Level 10

Thanks Graham,

Enjoy that!! We are settling down now for the weekend and I MUST stay away from the forum; or it will be the divorce courts on Monday morning!!

N.