The approach described below works only for card type forms
Create an edit box
set a font of this edit box to be WingDings
Add a block character as sourceexpression ('n')
Make the character BIG (I used size 300)
Disable borders, focusing
Create another edit box on top of first and assign field/variable as you usually do
Set the BackTransparent property to TRUE
Now- if you change (dynamically) the foreground color ofthe first edit the user will see the background of the second edit changing...
You could also create a bunch of textboxes in various colors with the same source expression, put them all in the same xpos and ypos and only show the one (using the VISIBLE property in your C/AL code) with the right color. This would work with both card type and list type forms, only with list type forms, the user can make all of them visible.
great tip, thank you .. unfortunately, though, my particular need is to be able to dynamically change the background of a particular field on a particular row of a list subform (ie - set the background on the "Sales Line".Description of the Sales Order subform to a different color (light grey) to denote a particular situation .. changing the font works, but changing the background gives a much better feel to my users .. hmmm, I wonder if I can implement a variation of your tip to accommodate my need .. time to experment again!
Naturally, there is always a possibility to design your own font - what would be displayed in reverse, so that the foreground change will actually change the background. ;-)
Maybe there is something like this on the net...
If you need to alternate between 2 colors you can use the UPDATESELECTED function in OnFormat trigger.
I am using it in synchronized windows to show the position of the cursor in slave window. It can be quite tricky, but still can be managed.
Comments
Indent Selected Editable ForeColour FontBold
so I guess the answer is no :roll:
The approach described below works only for card type forms
Create an edit box
set a font of this edit box to be WingDings
Add a block character as sourceexpression ('n')
Make the character BIG (I used size 300)
Disable borders, focusing
Create another edit box on top of first and assign field/variable as you usually do
Set the BackTransparent property to TRUE
Now- if you change (dynamically) the foreground color ofthe first edit the user will see the background of the second edit changing...
RIS Plus, LLC
Maybe there is something like this on the net...
If you need to alternate between 2 colors you can use the UPDATESELECTED function in OnFormat trigger.
I am using it in synchronized windows to show the position of the cursor in slave window. It can be quite tricky, but still can be managed.