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

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

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

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

Reply