x++


How can I set the Backgoundcolor of an AX2012 Action Pane Button


I'm trying to set the background color of an Action Pane Button so I changed the init-Method to this:
public void init()
{
super();
myButton.colorScheme(FormColorScheme::RGB);
myButton.backgroundColor(WinAPI::RGB2int(255,0,0));
}
but myButton (AutoDeclaration is on) does not become red.
Even when I set these properties by hand, the color does not change.
The Button has an Action, where the Image is defined. But removing that won't help.
It isn't possible to provide a custom background color for buttons in the action pane.
If you just want the button to look different, you can set the ToogleButton property to Check and the ToggleValue property to On to give it a difference appearance, you will also need to add code in the clicked method for the button to prevent it toggling to Off. This will give the button a different background color, but you won't have any control over the color used.

Related Links

How to Edit address using X++ in AX 2012
Number sequence issue Ax 2012?
Find code that's running in a Batch Job
What is the _isMexican boolean for in the Global::Checkpower method?
AlwaysOnTop property not behaving properly
Boolean AND logic in Microsoft Dynamics AX 2012 AIF QueryCriteria
Table: PrintMgmtSettings Field: Printjobsettings(Blob)
What happened to the hrplimittablerelationship table in ax-2012-r2?
Why is my changes ignored to releaseupdate scripts in dynamics ax 2012 r2
What is “old sys” exactly and why would I receive errors in 2012 because of a missing Macro?
How to filter records in line grid based on selected record in header grid?
Dynamic linking gets cleared when inserting new records
Box::info showing “refreshEx”
How to filter lookup values on a dialogfield in Report Dialog based on another dialogfield in AX 2012 AOT reports?
Adding scrollbar to a Group in AX 2012 form
Table query inconsistent

Categories

HOME
prism
css3
numbers
spring-data-redis
bitbucket-api
google-cloud-functions
nsbundle
code-coverage
crystal-reports-2013
azure-container-service
odoo-8
performancepoint
spin
okhttp
ibeacon-android
plink
google-picker
identity-management
jmp
asciidoctor-pdf
visual-studio-extensions
exploit
monit
dynamically-generated
beta
google-api-client
custom-post-type
8051
intersystems-cache
subclass
tizen-tv
uitapgesturerecognizer
scatter3d
deltaspike
laravel-eloquent
card.io
instantiation
indy10
batching
swagger-php
watchman
nohup
bc
odroid
comparison-operators
drupal-theming
signal-strength
jboss-4.2.x
dotnet-httpclient
tinymce-3
singleinstance
context-switch
appdomain
otp
bbpress
django-1.10
rsa-archer-grc
pure-css
simplepie
hadoop-2.7.2
ng-grid
gogs
stream-processing
redis-cluster
contentcontrol
relativelayout
concurrentmodification
decimalformat
java-money
file-move
flock
dronekit-android
apache-commons-daemon
bufferedinputstream
infosphere-spl
iiop
crowd
tinyxml
buffering
terminate
amslidemenu
scriptaculous
css-reset
onload-event
stacky
curb
saleslogix
multiplexing
apache-commons-dbutils
google-maps-mobile
denied
matlab-load
webdev.webserver
drawtobitmap
dataform
load-time
silent
binomial-heap
sifr
sun
escrow
great-circle

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App