NAV Form Control update. (Redraw)

XypherXypher Member Posts: 297
edited 2008-07-03 in NAV Tips & Tricks
Well first off I'm not even sure if anyone else experiences this issue. I see no posts on it, and previously when I had asked for a remedy on this issue no one really responded.

So I have to ask, "Am I the only one experiencing an intermittent issue involving enabling / disabling control(s) at Runtime. Where the control(s) do not get properly updated (redrawn) to correctly show their [specifically disabled] state?"

Enabling controls, sure, that works fine. The background of the textbox or whatever becomes white and the font color becomes black. But when disabling a control sometimes (or for me, most often) the textbox will still have a white background whilst the font color goes gray and you are unable to click focus on the control.

Answers

  • Slawek_GuzekSlawek_Guzek Member Posts: 1,690
    Hi,

    You're not alone :) if this helps you :)

    I didn't find any useful workaround for this problem.

    Regards,
    Slawek
    Slawek Guzek
    Dynamics NAV, MS SQL Server, Wherescape RED;
    PRINCE2 Practitioner - License GR657010572SG
    GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-03
  • garakgarak Member Posts: 3,263
    know "feature" since nav 2.00 :oops: , or was it also in 1.xx :-k
    Do you make it right, it works too!
  • XypherXypher Member Posts: 297
    OK whew. So I'm not the only one.

    So that ALSO means I can give everyone the "work around" for this problem.



    I am so excited to have found the fix to this bug!
    CurrForm.InnocentControlOnForm.Height := CurrForm.InnocentControlOnForm.Height + 1;
    CurrForm.InnocentControlOnForm.Height := CurrForm.InnocentControlOnForm.Height - 1;
    

    The idea is to increment the height or width of an object on your form by such a minute difference there is no actual change in the object itself. But instead by doing so this forces Navision to flag the window for a redraw on the next cycle; to accommodate for the "change".

    (Oh, and you only need to create a resize of a single object on the form, and not necessarily the one you want updated.)
  • krikikriki Member, Moderator Posts: 9,094
    [Topic moved from Navision forum to Navision Tips & Tricks forum]
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


Sign In or Register to comment.