Power Apps Button – Modern Controls



Purpose

A Power Apps button control is used to trigger an action when clicked or tapped. Its purpose is to provide a way for the user to initiate actions and navigate through an interface.



Properties

AcceptsFocus
Determines whether the button can be focused on using the tab key or SetFocus function
AccessibleLabel
Screen readers will voice this text when a user selects the control
Appearance
Sets the button’s style

Options:

= “Primary”



= “Secondary”

ContentLanguage
Describes the language used to the audience (e.g. “en-US”)
DisplayMode
Selects the mode: Edit, View or Disabled. In Edit mode the user can input values. In View mode the user can only see the values and in Disabled mode the control is greyed-out.

Options:
= DisplayMode.Disabled
= DisplayMode.Edit
= DisplayMode.View
Height
Distance from the top of the control to the bottom
OnChange
Unknown purpose.
OnSelect
Actions that will be executed when the button is pressed.
Text
Text displayed on the button
Visible
Determines whether to show or hide the control
Width
Distance from the left side of the control to the right side
X
Distance from the left edge of the screen to the left side of the control
Y
Distance from the top edge of the screen to the top of the control




How To Use The Power Apps Button Control

1. Select the button control in Power Apps studio. Input a value into the Text property.

"OK"



2. Write code in the OnSelect property of the button to execute an action when the button is pressed.

Set(varShowMenu, false);



3. Click on the button to run the action.





Questions?

If you have any questions or feedback about Power Apps Button – Modern Controls please leave a message in the comments section below. You can post using your email address and are not required to create an account to join the discussion.

Subscribe
Notify of
guest

4 Comments
Oldest
Newest
Inline Feedbacks
View all comments
John L
John L
1 year ago

I like the new features, but this one in particular confuses me. How is this different from any other button?

The imagery is better, but otherwise…

Mohammed
Mohammed
4 months ago

I’m using the modern form and controls and seeking assistance with the unsaved function. In the legacy form, I successfully used this function to disable the button when there were no changes in the form. However, I’m encountering challenges adapting it to work with the modern controls. Any guidance or suggestions would be greatly appreciated.
If(FormName.Unsaved, DisplayMode.Edit,DisplayMode.Disabled)

Last edited 4 months ago by Mohammed
Doug
Doug
2 months ago
Reply to  Mohammed

Mohammed,
I’m having the same kind of problem. I’ve tried both classic and modern buttons, and I’m not having any success changing the display mode from within a button’s own click or through another event, like the screen OnVisible or another button click. I’d love some help here, too.