web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

toggle button and stay down

(0) ShareShare
ReportReport
Posted on by 320

Hi,

Is it possible to keep a button down after clicking on it once? And when clicking the button again: jump back in its original state (up). In Dynamics AX 2012 R3 CU8 I have:

Form1

[design]

- ButtonGroup1

   - Button1

   - Clicked method1

      // this.toggleValue(!this.toggleValue);

I want the button to be able to toggle: on/off. But playing around with properties like: ToggleButton and ToggleValue ain't wokring for me. 

Is there an example available in AX, or does anyone have an idea?

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Anton Venter Profile Picture
    20,346 Super User 2025 Season 2 on at

    Hi Berend, what you are describing is actually a checkbox where the style has been changed to represent a button but AX does not support that.

  • Suggested answer
    botten Profile Picture
    320 on at

    Thanks, you triggered me to test the following Button properties:

    ButtonDisplay=ImageOnly

    NormalImage=MyButtonUpImage

    Then when Clicked() I change the toggleValue and depending on the toggleValue I swith the normal button image from "MyButtonUpImage" to "MyButtonDownImage".

    That will work for now, though I have a feeling that there is a better solution to it.

  • Suggested answer
    André Arnaud de Calavon Profile Picture
    301,158 Super User 2025 Season 2 on at

    Hi Berend,

    Actually there are some examples in AX 2012. You can have a look at the security development tool where there are buttons for 'Portal security on' and 'mark form controls'. This is exaclty doing what you describe.

  • botten Profile Picture
    320 on at

    Thanks André,

    I read the code of the SecurityWorkSpaceEPSSRS.Clicked() method and basically they do the same: use the toggleValue to determine what text to show.

    btw, where did that pm go to?

  • André Arnaud de Calavon Profile Picture
    301,158 Super User 2025 Season 2 on at

    Hi Berend,

    What do you mean with 'pm'?

  • botten Profile Picture
    320 on at

    personal message

  • André Arnaud de Calavon Profile Picture
    301,158 Super User 2025 Season 2 on at

    That's personal ;)

  • Suggested answer
    Alex Kwitny Profile Picture
    395 on at

    I just came across this thread, but this IS possible, but you have to put the buttons on an ActionPane control.

    That's the only way I've been able to get it to work easily.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans