Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Hi, changing fill color

New Here ,
Oct 03, 2016 Oct 03, 2016

I'm working for a time schedule, what I need is if they choose the time 8am-2pm and click the text box with contains of that schedule all I want to have a color on that text box, let say yellow. Also if they want to unchoose it and change the time schedule the color will be back on white. Is that possible?

TOPICS
Acrobat SDK and JavaScript
318
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 03, 2016 Oct 03, 2016

Yes, but you need to better describe how you want it to work, exactly. Also, it's not clear on whether this is a text field or a drop-down field, and what field(s) you want to color based on the time selection.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 03, 2016 Oct 03, 2016

After seeing the file in question, the solution was to use this code as the MouseUp event of the field:

event.target.fillColor = (color.equal(event.target.fillColor, color.transparent)) ? color.yellow : color.transparent;

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 03, 2016 Oct 03, 2016
LATEST

Thank you so much. It's working

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines