I am using Navision 3.01B, and this is my first attempt at using the CaptionClass property. I want to change the caption for a Menu Item on a Menu Button drop-down menu, using CaptionClass. I have put the coding to process my caption class into the CaptionClassTranslate function of Codeunit 1, and proved that it works when I set the CaptionClass property on a table field, or a field on a form. However, when I set the same value into the Caption Class property of the Menu Item, it does not work, and running the debugger shows me that Codeunit 1 is not even accessed when I click on the Menu Button. Has anyone else met this? Is CaptionClass supposed to work for Menu Items? Thanks, Andy
Hi Andy. I think you should check the property “Caption” on the Menu Button. If you are simply changing what text is on the button this is the place for it. CaptionClass is just for Global Dimensions as they can be named differently. (Earlier Department and Project but can named whatever). I am sorry if this is a misunderstanding.
CaptionClass does not work for buttons (Menu…,Command…) as far as I know.
Thanks for your thoughts. Maybe there is another way - I could create 2 menu buttons, one on top of the other, and switch the VISIBLE property, depending on which set of menu items I want.
quote:
Originally posted by G.Petursson
I think you should check the property “Caption” on the Menu Button. If you are simply changing what text is on the button this is the place for it. CaptionClass is just for Global Dimensions as they can be named differently. (Earlier Department and Project but can named whatever).
Hi Gudmundur, Can you tell me how exactly you would do this? As far as I can see, then you can not dynamically access the caption of a form control.
quote:
Hi Gudmundur, Can you tell me how exactly you would do this? As far as I can see, then you can not dynamically access the caption of a form control.
Hi Erik. I treated Andy as a newbie as I thought he was just going to change the caption permanently…[B)] Unfortunately I do not know of any way to change the caption on-the-fly. Except for this trick Andy mentiones to have two or more buttons and hide all but one. But that’s all. [:I]