HOW to Change Captions of Label control at runtime?

ramesh.aynramesh.ayn Member Posts: 41
Hi everybody ...

here i would like to change Captions of Label control .
i am getting multiple value from database at runtime.
i need to show them in a single label just like Updating values in a dialog window.

but navision has reserved properties. i could not able to do it.

so anybody has solutions for this?

regargs,
Ramesh

Comments

  • ngebhardngebhard Member Posts: 127
    Hi,

    I used the CaptionClass-property in the table-field and made a new function in codeunit 1. If you wanna see how CaptionClass work you can have a look at the dimensions or the VAT-fields (amount incl. VAT) in the sales documents. This fields are changed on run time.

    In codeunit 1, I changed the CaptionClassTranslate-function and added a third option. Then I read a new function where I get my description using different parameters, i.e. user name and session id. In the CaptionClass-property in the table I just enter my parameters (starting with 3 for the third option) which I check in the new function and then I get the description I need.

    I hope someone can understand what I mean?! :)
    Otherwise ask again and I try to explain it again/more detailed!

    Greetz
    Nicole
    ProTAKT Projekte & Business Software AG
    Microsoft Dynamics NAV Partner
    Bad Nauheim, Germany
    http://www.protakt.de
    http://twitter.com/protakt
  • jreynoldsjreynolds Member Posts: 175
    If your captions are not part of a table box or matrix box then you can use text boxes instead of labels. Set the source expression to a global variable and set the value of the variable at run time. If you are working with a table box or matrix box then I think the only way is to use caption classes.
  • ngebhardngebhard Member Posts: 127
    I found an entry in Tips&Tricks how to change the caption without changing codeunit 1. I didn't try this yet, but maybe you want to have a closer look on it.

    http://www.mibuso.com/forum/viewtopic.php?t=6746

    Greetz
    Nicole
    ProTAKT Projekte & Business Software AG
    Microsoft Dynamics NAV Partner
    Bad Nauheim, Germany
    http://www.protakt.de
    http://twitter.com/protakt
Sign In or Register to comment.