Expand my Community achievements bar.

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

6 Replies

Avatar

Level 2

Can somebody tell me how to attach a document to this thread? ;-)

Avatar

Former Community Member

can u send your sample PDF to my mail id

rmchalukya@gmail.com

Regards--

Chalukya.

Avatar

Former Community Member

I have replied to your mail.

let me know was it useful.

Regards--

Chalukya.

Avatar

Former Community Member

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