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

How to change current field background color

Avatar

Level 2

I have created a simple example file to demonstrate my problem.

1) The user clicks on a field (left mouse click) and a popup menu appears.
2) The user makes his choice (in this example, the user chooses a color)

3) The active field (mouse cursor) will be changed (fillColor) to reflect the user's chosen color

My problem is that the change of background color (fillColor) is only visible AFTER navigating

away from the active field.

The use of xfa.layout.relayout() after setting the new color does not help.

Any help much appreciated!

Regards,

Nico

0 Replies

Avatar

Level 2

Can somebody tell me how to attach a document to this thread? :winking_face:

Avatar

Level 4

can u send your sample PDF to my mail id

rmchalukya@gmail.com

Regards--

Chalukya.

Avatar

Level 4

I have replied to your mail.

let me know was it useful.

Regards--

Chalukya.

Avatar

Level 4

Hi Nico,

I tried doing it without setfocus(), but was not possible.
Hope someone have better ideas.
All the Best.
Regards--
Chalukya.

Avatar

Level 2

Worked out a solution.

1) Navigating to a (very small) dummy field

2) By navigating away from the active field, background color is being set

3) Dummy field's enter event navigates back to the original field

Example code available...not able to upload as an attachment to this thread