changing button caption at runtime

Hello; Does anyone know how to change a button’s caption at runtime? Is there an undocumented property, method or work-around to accomplish this? Brian.

It is not possible to change a caption of a command button at run time. However, you can place a text box on top of a command button and change the source expression of the text box dynamically. Bill Benefiel Manager of Information Systems Overhead Door Company billb@ohdindy.com (317) 842-7444 ext 117

Alternative you can place two command-bottons on top of each-other. Be sure to give the bottons a name, and set “Visible” to false on one of them. then


OnAfterGetCurrentRecord:

CurrForm.Botton1.Visible(Amount = 0);
CurrForm.Botton2.Visible(Amount <> 0);

this gives you the opportunity to have different actions, depending on the data. Kind regards, Henrik Helgesen Edited by - hhelgesen on 2001 May 03 19:01:45

I don’t think it will help you now, but as far as I know, then this is possible in Navision Solutions 3.00. Best regards, Erik P. Ernst, webmaster Navision Online User Group

quote:


Originally posted by wbenefiel: However, you can place a text box on top of a command button and change the source expression of the text box dynamically.


Judging from previous experience, I expect that placing a textbox on top of a command button will effectively block the command button’s ability to react to mouse clicks (since mouse events will then be handled by the text box, not by the button). I suggest that you use a transparent command button on top of a text box.