Breyta

Deila með


Check box control in Power Apps

A control that the user can select or clear to set its value to true or false.

Description

The user can specify a Boolean value by using this familiar control, which has been used in GUIs for decades.

Key properties

Default – The initial value of a control before it is changed by the user.

Text – Text that appears on a control or that the user types into a control.

Value – The value of an input control.

Additional properties

BorderColor – The color of a control's border.

BorderStyle – Whether a control's border is Solid, Dashed, Dotted, or None.

BorderThickness – The thickness of a control's border.

CheckboxBackgroundFill – The background color of the box that surrounds the checkmark in a checkbox control.

CheckboxBorderColor – The color of the border that surrounds the checkmark in a checkbox control.

CheckboxSize – The width and height of the box that surrounds the checkmark in a checkbox control.

CheckmarkFill – The color of the checkmark in a checkbox control.

Color – The color of text in a control.

DisplayMode – Whether the control allows user input (Edit), only displays data (View), or is disabled (Disabled).

DisabledBorderColor – The color of a control's border if the control's DisplayMode property is set to Disabled.

DisabledColor – The color of text in a control if its DisplayMode property is set to Disabled.

DisabledFill – The background color of a control if its DisplayMode property is set to Disabled.

Fill – The background color of a control.

FocusedBorderColor – The color of a control's border when the control is focused.

FocusedBorderThickness – The thickness of a control's border when the control is focused.

Font – The name of the family of fonts in which text appears.

FontWeight – The weight of the text in a control: Bold, Semibold, Normal, or Lighter.

Height – The distance between a control's top and bottom edges.

HoverBorderColor – The color of a control's border when the user keeps the mouse pointer on that control.

HoverColor – The color of the text in a control when the user keeps the mouse pointer on it.

HoverFill – The background color of a control when the user keeps the mouse pointer on it.

Italic – Whether the text in a control is italic.

OnCheck – Actions to perform when the value of a checkbox or a toggle changes to true.

OnSelect – Actions to perform when the user taps or clicks a control.

OnUncheck – Actions to perform when the value of a checkbox or a toggle changes to false.

PaddingBottom – The distance between text in a control and the bottom edge of that control.

PaddingLeft – The distance between text in a control and the left edge of that control.

PaddingRight – The distance between text in a control and the right edge of that control.

PaddingTop – The distance between text in a control and the top edge of that control.

PressedBorderColor – The color of a control's border when the user taps or clicks that control.

PressedColor – The color of text in a control when the user taps or clicks that control.

PressedFill – The background color of a control when the user taps or clicks that control.

Reset – Whether a control reverts to its default value.

Size – The font size of the text that appears on a control.

Strikethrough – Whether a line appears through the text that appears on a control.

TabIndex – Keyboard navigation order in relation to other controls.

Tooltip – Explanatory text that appears when the user hovers over a control.

Underline – Whether a line appears under the text that appears on a control.

VerticalAlign – The location of text on a control in relation to the vertical center of that control.

Visible – Whether a control appears or is hidden.

Width – The distance between a control's left and right edges.

X – The distance between the left edge of a control and the left edge of its parent container (screen if no parent container).

Y – The distance between the top edge of a control and the top edge of the parent container (screen if no parent container).

If( Condition, Result )

Example

  1. Add a Check box control, name it chkReserve, and set its Text property to show Reserve now.

    Don't know how to add, name, and configure a control?

  2. Add a Date picker control, and set its Visible property to this formula:
    If(chkReserve.Value = true, true)

    Want more information about the If function or other functions?

  3. Press F5, click or tap chkReserve to set its Value property to true, and then click or tap chkReserve again to set its Value property to false.

    The Date Picker control appears when the Value property of chkReserve is true but not when it's false.

  4. To return to the default workspace, press Esc.

Accessibility guidelines

Color contrast

There must be adequate color contrast between:

  • CheckmarkFill and CheckboxBackgroundFill
  • CheckboxBackgroundFill and Fill
  • CheckboxBackgroundFill and PressedFill
  • CheckboxBackgroundFill and HoverFill

This is in addition to the standard color contrast requirements.

Screen reader support

  • Text must be present.

Keyboard support