C A/L Properties

Quite a straightforward request, so forgive me my ignorance… C A/L properties such as UPDATEFORECOLOR and UPDATEFONTBOLD…is there a definitive list of these anywhere? No laughter, either, please…[:D]

Good printed documentation is scarce, but I always use the CA/L symbol menu [f(x) button] when I’m looking for properties or functions. Try this: While editing a form, click f(x), select currForm → controls → the name of the control in question → the right arrow (bottom right) → afterFormat → the possible afterFormat commands. The choices are different depending on what kind of object you have selected.

Hi Darren I suggest to look in the Navision help for these properties. I know this is not always very helpful [:(]. On the other hand try to search the forum for the property you want to know something more. Here are two examples: YourControl.Updateforecolor(255) shows red figures This is good for negative figures [:D]. YourControl.Updatefontbold(True) should show bold text! Both properties should be set (in a form) in the OnFormatTrigger of the control. bye André

Only the C/AL help as far as Im aware. The application designers guide contains how-to’s, but no explanation of those properties (not in the version I have anyways). A good way of finding out what functions are available to you is to press F5 whiles’t designing an object then browse through the symbol menu. Interesting functions can often be found beneath CurrForm, CurrReport etc. In your example, UPDATEFORECOLOR and UPDATEFONTBOLD can only be used on the OnFormat trigger of the control that you want to apply this to. On the symbol menu (F5), this is found under CurrForm > Controls > > AfterFormat If the control you want to apply changes to is not on this list, you may need to change the name of the control from the default (the name property of the control). Hope this is of use and that Im not stating the bleeding obvious! Regards, Edward.

Thanks Andre, Using the properties is not the issue, more having a reference with all available properties listed by control type. It does seem like there is no other way than using the CA/L symbols option mentioned by Milton. Typical !!! Darren.

quote:


Originally posted by Andre DDB
Hi Darren I suggest to look in the Navision help for these properties. I know this is not always very helpful [:(]. On the other hand try to search the forum for the property you want to know something more. Here are two examples: YourControl.Updateforecolor(255) shows red figures This is good for negative figures [:D]. YourControl.Updatefontbold(True) should show bold text! Both properties should be set (in a form) in the OnFormatTrigger of the control. bye André


Select a control, select View/Color and select a background-color. Now take a look at the control’s property and you see the numerical code for the color choosen. Smart? Perhaps not[xx(], but it works[:o)]!

Hi I guess we have here a similar issue like this with the Format property (see my posting in the “Tips & Tricks” -section). Some important things (e.g. the new name of control for working with the OnFormat- Trigger) you will find nowhere in the Navision help. That’s IMHO the main problem with the navision help AND the missing manuals. Therefore I would like to ask you once again to share your knowledge here on Navison.net. @Darren: If nobody else did this I will try to post tomorrow an example with all Update - properties. Check it tomorrow. bye André

Hi I played with the CurrForm.Controls.Properties today. I tried to set all possible properties for a control on a form. I you want to follow my steps - that is the way: - create a new form - create two variables: i1 (Integer) / i2 (Decimal) - place a control (textbox) on the form select the properties of this control Name: i1 That’s important and nowhere explained in the help! Source exp: i1 (It’s the same. Doesn’t matter!) select [F9] - go to the OnFormat - Trigger copy the following code into this section IF i1 < 0 THEN CurrForm.i1.UPDATEFORECOLOR(255) ELSE CurrForm.i1.UPDATEFORECOLOR(1); IF i1 <> 0 THEN BEGIN i2:= ROUND(i1 / 2,1); IF (i1 / 2) - i2 = 0 THEN BEGIN CurrForm.i1.XPOS(150); CurrForm.i1.YPOS(150); CurrForm.i1.WIDTH(2000); CurrForm.i1.HEIGHT(1000); CurrForm.i1.UPDATEINDENT(5); // for Text only CurrForm.i1.UPDATEFONTBOLD(TRUE); CurrForm.i1.EDITABLE(TRUE); END ELSE BEGIN CurrForm.i1.XPOS(1500); CurrForm.i1.YPOS(1500); CurrForm.i1.WIDTH(1000); CurrForm.i1.HEIGHT(2000); CurrForm.i1.UPDATEINDENT(0);// for Text only CurrForm.i1.UPDATEFONTBOLD(FALSE); CurrForm.i1.EDITABLE(FALSE); END; END; IF (i1 = -10) OR (i1 = -5) OR (i1 = 0) OR (i1 = 5) OR (i1 = 10) THEN CurrForm.i1.ENABLED(FALSE) ELSE CurrForm.i1.ENABLED(TRUE); // Other // // CurrForm.i1.UPDATESELECTED(True) //to select the current control // CurrForm.i1.DECIMALPLACESMAX(3) //clear // CurrForm.i1.DECIMALPLACESMIN(1) //clear // CurrForm.i1.UPDATEEDITABLE(True) //to set the property temporarily in OnBeforeInput // Visible doesn't work as expeceted. // If the control is set (by code) as Visible(False) then this control can't // set as Visible(True) anymore. I don't know why! // //IF (i2 > 10) OR (i2 < -10) // THEN CurrForm.i1.VISIBLE(FALSE) // ELSE CurrForm.i1.VISIBLE(TRUE); // If you want to have fun remove the '//' in the following line ;-) //CurrForm.i1.UPDATE; - place two buttons on the form - select the properties of the first button Caption: + select [F9] - go to the OnPush - Trigger copy the following code into this section IF i1 < 11 THEN i1:= i1 + 1; CurrForm.UPDATE; - select the properties of the second button Caption: - select [F9] - go to the OnPush - Trigger copy the following code into this section IF i1 > -11 THEN i1:= i1 - 1; CurrForm.UPDATE; - save & run the form - see what happens if you click on the buttons While testing I found a certain way to crash Navison. With CurrForm.i1.UPDATE. bye André