Update Font Color

sadynamicssadynamics Member Posts: 42
Hi Experts,

is it possible to update font color at run time.
i have created one button in on push i have return currfrom.field.updateforecolor(value) to change the color of the field.
but it is giving error as

'dynamic property 'color set' cannot be changed in this context' ...

could you please advise on this issue......

thank you...
Luv,
Dynamics Lover

Comments

  • krikikriki Member, Moderator Posts: 9,110
    You can only use that function in the OnFormat-trigger of the field.
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • sadynamicssadynamics Member Posts: 42
    Thanks Kriki,

    How do i change the font color run time.say if i am creating one button after clicking that button my text should change to that color...
    Luv,
    Dynamics Lover
  • tinoruijstinoruijs Member Posts: 1,226
    sadynamics wrote:
    How do i change the font color run time.say if i am creating one button after clicking that button my text should change to that color...

    In the OnPush of the button:
    intColor := 255; // Red
    CurrForm.UPDATE;

    In the OnFormat of the fields:
    CurrForm.FieldName.UPDATEFORECOLOR(intColor);

    Tino Ruijs
    Microsoft Dynamics NAV specialist
Sign In or Register to comment.