Question Status

Suggested Answer
SuperTramp asked a question on 17 Feb 2014 1:18 AM

Hello, how is it possible to determine a button state? Is it active(clicked) or not?

Reply
Dominic Lee responded on 17 Feb 2014 2:01 AM

Hi Supertramp,

You can override the "clicked" method at the control level, is that what you are looking for?

Regards,

Dominic

kind regards,

Dominic Lee

My blog | PBC

This forum post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

Reply
SuperTramp responded on 17 Feb 2014 2:07 AM

thanks for answer Domenic. here is my situation: there is a button 'A' and when I click this button I need to determine the state of button 'B'. for example pseudocode

if(ButtonB.IsClicked) { //do something }

Reply
Dominic Lee responded on 17 Feb 2014 4:17 AM

Hi,

I am not sure I get what you mean. When button 'A' is clicked, then button 'B' would be, naturally, not clicked. At least when we are talking about keyboard and mouse, not multi-touch input. Your description of button B sounded like something that can be done with a radio button or checkbox?

Regards,

Dominic

kind regards,

Dominic Lee

My blog | PBC

This forum post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

Reply
Suggested Answer
Denis Macchinetti responded on 17 Feb 2014 4:23 AM

Hi

As for my knowledge, you can only "save" if the Button was pressed or not, e.g. in a variable.

As for your requirement, I think is better manage a checkbox.

So if ticked, do something.

Regards

Thanks & Regards

Denis Macchinetti

Technical Architect

Respect the provided answers from other community members. Don't provide or do not copy the same answer to the same thread. Additional insights are welcome!

Reply
Klaas Deforche responded on 17 Feb 2014 5:13 AM

This is the same question that is asked here: stackoverflow.com/.../determine-button-state-clickedactive-or-not-ms-dynamics-ax

It's better not to double post...

Reply
Suggested Answer
Denis Macchinetti responded on 17 Feb 2014 4:23 AM

Hi

As for my knowledge, you can only "save" if the Button was pressed or not, e.g. in a variable.

As for your requirement, I think is better manage a checkbox.

So if ticked, do something.

Regards

Thanks & Regards

Denis Macchinetti

Technical Architect

Respect the provided answers from other community members. Don't provide or do not copy the same answer to the same thread. Additional insights are welcome!

Reply