Color and controls?

abartonicek
Member Posts: 162
I know that UPDATEFORECOLOR can be called only from OnFormat trigger so my question is:
Is there any way to (dynamically) change button or label font color?
Is there any way to (dynamically) change button or label font color?
Better to be critical then self-critical 

0
Comments
-
I checked it out, but I don't find anything that allows to do it. So I am afraid it is not possible.Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
You can take a textbox and set the borderproperty to false, then update the color.
You can put the labeltext in the sourceexpression.
You can also add leadersdots to a textbox.
It's a workaround :?0 -
That works for!
OK, we have workaround for Label.
Any idea for Button, Menu button or Menu button menu items?Better to be critical then self-critical0 -
How many colors do you want? :?
If you want e.g. to flip red/green you can make 2 buttons visible/invisible :oops:
Otherwise I cannot think of anything.0 -
Mark Brummel wrote:If you want e.g. to flip red/green you can make 2 buttons visible/invisible :oops:
Here's an old doc I'd figure I'd throw in here before I lose it forever on my hard drive. O:)
Issue
How can I dynamically control Command and Menu buttons on Navision forms?
Resolution
Assign a value to the Name property of a command or menu button then you can dynamically set the Enabled or Visible properties of the control in the trigger code using C/AL commands.
For example, to disable a menu button that has the value of the Name property set to btnCustomer, you would use the following command:
CurrForm.btnCustomer.ENABLED(FALSE);
Unfortunately, there is not a method to dynamically control the individual menu items of a menu button. However, it would be possible to create two different menu buttons with different Name property values. These two button controls could then be stacked on top of each other and trigger code added to the form to make one button visible and one button not visible, based upon the desired criteria.
For example, to control which menu button is displayed, based on the existence of a customer email address, where the button controls were named btnCustomer1 and btnCustomer2, you would use the following code in the OnAfterGetCurrRecord trigger:
IF "E-Mail" = '' THEN BEGIN
CurrForm.btnCustomer1.VISIBLE(TRUE);
CurrForm.btnCustomer2.VISIBLE(FALSE);
END ELSE BEGIN
CurrForm.btnCustomer1.VISIBLE(FALSE);
CurrForm.btnCustomer2.VISIBLE(TRUE);
END;0 -
-
I already done hiding menu button, guess I'll do it again
I hoped there are some more sophisticated methodBetter to be critical then self-critical0 -
You could try something like the comment button on the sales order form. Here the button is transparent and there is a bitmap control behind the button so the button takes on the appearance of the bitmap.0
-
I can't find it.
I'm looking at Form 42!
I have localized version, does this matter?Better to be critical then self-critical0 -
It is the little pencil next to the no. field on virtualy any card form of navision.0
-
OK, found it!
Thanks.Better to be critical then self-critical0 -
Apparently this method works only with Command Button but NOT with Menu Button ](*,)Better to be critical then self-critical0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions