You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: powerapps-docs/maker/canvas-apps/working-with-form-layout.md
+20-20Lines changed: 20 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ ms.service: powerapps
7
7
ms.topic: conceptual
8
8
ms.custom: canvas
9
9
ms.reviewer: tapanm
10
-
ms.date: 02/10/2020
10
+
ms.date: 05/06/2020
11
11
ms.author: gregli
12
12
search.audienceType:
13
13
- maker
@@ -24,15 +24,15 @@ In this tutorial, we'll walk through the steps to create this form. We'll also l
24
24
25
25
## Before you start
26
26
27
-
If you're new to Power Apps (or have only generated apps automatically), you'll want to [build an app from scratch](get-started-create-from-blank.md) before you dive into this topic. By building an app from scratch, you'll become familiar with required concepts, such as adding data sources and controls, that are mentioned but not explained in this topic.
27
+
If you're new to Power Apps (or have only generated apps automatically), you'll want to [build an app from scratch](get-started-create-from-blank.md) before you dive into this article. By building an app from scratch, you'll become familiar with required concepts, such as adding data sources and controls, that are mentioned but not explained in this article.
28
28
29
-
This topic is written as though you have a data source that's named **Sales order** and that contains the fields in the previous graphic. If you have a Power Apps Plan 2 license or a [trial license](../signup-for-powerapps.md) and system administrator or system customizer permissions, you can [create an entity](../common-data-service/data-platform-create-entity.md) in Common Data Service and add similar fields.
29
+
This article is written as though you have a data source that's named **Sales order** and that contains the fields in the previous graphic. If you have a Power Apps Plan 2 license or a [trial license](../signup-for-powerapps.md) and system administrator or system customizer permissions, you can [create an entity](../common-data-service/data-platform-create-entity.md) in Common Data Service and add similar fields.
30
30
31
31
## Add a gallery
32
32
33
33
1. Create a tablet app from scratch, and add your data source.
34
34
35
-
Everything discussed in this topic also applies to phone layouts, but phone apps often have only one vertical column.
35
+
Everything discussed in this article also applies to phone layouts, but phone apps often have only one vertical column.
36
36
37
37
2. Add a vertical **Gallery** control, and set its **Items** property to **'Sales order'**.
38
38
@@ -43,7 +43,7 @@ This topic is written as though you have a data source that's named **Sales orde
43
43
44
44

45
45
46
-
This record will appear in the form that you build by following steps later in this topic.
46
+
This record will appear in the form that you build by following steps later in this article.
47
47
48
48
## Add a title bar
49
49
1. Add a blank screen where you'll put the form.
@@ -92,7 +92,7 @@ This topic is written as though you have a data source that's named **Sales orde
92
92

93
93
94
94
## Select a data card
95
-
Each field displayed has a corresponding data card on the form. This card comprises a set of controls for the field title, an input box, a star (which appears if the field is required), and a validation error message.
95
+
Each field displayed has a corresponding data card on the form. This card includes a set of controls for the field title, an input box, a star (which appears if the field is required), and a validation error message.
96
96
97
97
You can also select cards directly on the form. When a card is selected, a black caption appears above it.
98
98
@@ -102,7 +102,7 @@ You can also select cards directly on the form. When a card is selected, a black
102
102
> To delete a card (not just hide it), select it, and then press Delete.
103
103
104
104
## Arrange cards in columns
105
-
By default, forms in tablet apps have three columns, and those in phone apps have one. You can specify not only how many columns a form has but also whether all cards should fit within column borders.
105
+
By default, forms in tablet apps have three columns, and in phone apps have one. You can specify not only how many columns a form has but also whether all cards should fit within column borders.
106
106
107
107
In this graphic, the number of columns in the form was changed from three to four with the **Snap to columns** check box selected. The cards in the form were arranged automatically to fit the new layout.
108
108
@@ -111,7 +111,7 @@ In this graphic, the number of columns in the form was changed from three to fou
111
111
## Resize cards across multiple columns
112
112
Depending on the data in each card, you might want some cards to fit in a single column and other cards to span multiple columns. If a card contains more data than you want to show in a single column, you can widen the card by selecting it and then dragging the grab handle on the left or right border of its selection box. As you drag the handle, the card will "snap" to column boundaries.
113
113
114
-
To make your design more flexible but retain some structure, you can increase the number of columns to 12. With that change, you can easily configure each card to span the entire form, half of the form, one-third, one-quarter, one-sixth, and so forth. Let's see this in action.
114
+
To make your design more flexible but keep some structure, you can increase the number of columns to 12. With that change, you can easily configure each card to span the entire form, half of the form, one-third, one-quarter, one-sixth, and so forth. Let's see this in action.
115
115
116
116
1. In the right-hand pane, set the number of columns in the form to **12**.
117
117
@@ -133,17 +133,17 @@ To make your design more flexible but retain some structure, you can increase th
133
133
134
134
All done. We have our desired form, mixing rows with different numbers of columns:
135
135
136
-

136
+

137
137
138
138
## Manipulate controls in a card
139
-
The delivery address comprises several pieces of information that we want to visually group together for the user. Each field will remain in its own data card, but we can manipulate the controls within the card to make them fit better together.
139
+
The delivery address includes several pieces of information that we want to visually group together for the user. Each field will remain in its own data card, but we can manipulate the controls within the card to make them fit better together.
140
140
141
141
1. Select the **First line of Delivery address** card, select the label within that card, and then delete the first three words from the text.
142
142
143
143

144
144
2. Select the **Second line of Delivery address** card, select the label within that card, and then delete all of the text in it.
145
145
146
-
It may be tempting to simply remove the label control and, in many cases, that will work fine. But formulas might depend on that control being present. The safer approach is to remove the text or to set the **Visible** property of the control to **false**.
146
+
It may be tempting to remove the label control and, in many cases, that will work fine. But formulas might depend on that control being present. The safer approach is to remove the text or to set the **Visible** property of the control to **false**.
147
147
148
148

149
149
3. In the same card, move the text input box over the label to reduce the space between the first and second lines of the address.
@@ -162,19 +162,19 @@ Now let's turn our attention to the third line of the address. Similar to what w
162
162
| 4 |Using the grab handles on the sides, size the label control to fit the new text size. ||
163
163
| 5 |Select the text input control within this card. ||
164
164
| 6 |Using the grab handles on the sides, size the text input control to the size that you want. ||
165
-
| 7 |Drag the text input box up and to the right of the label control, and then drop the text input box. ||
165
+
| 7 |Drag up the text input box and to the right of the label control, and then drop the text input box. ||
166
166
| Our modifications to the **State** card are now complete. |||
167
167
168
168
The result for the complete third address line:
169
169
170
170

171
171
172
-
Note that many of the cards start out with dynamic formulas for their properties. For example, the Text input control that we resized and moved above had a **Width** property based on the width of its parent. When you move or resize a control, these dynamic formulas are replaced with static values. If you want, you can restore the dynamic formulas by using the formula bar.
172
+
Many of the cards start out with dynamic formulas for their properties. For example, the Text input control that we resized and moved above had a **Width** property based on the width of its parent. When you move or resize a control, these dynamic formulas are replaced with static values. If you want, you can restore the dynamic formulas by using the formula bar.
173
173
174
174
## Turning off Snap to columns
175
-
Sometimes you'll want finer control than the standard 12 columns can provide. For these cases, you can turn off **Snap to columns** and then position cards manually. The form will continue snapping to 12 columns, but you can also hold down the Alt or Ctrl+Shift keys after starting a resize or reposition to override the snap points. For more details, see [alternate behavior keyboard shortcuts](keyboard-shortcuts.md#alternate-behavior).
175
+
Sometimes you'll want finer control than the standard 12 columns can provide. For these cases, you can turn off **Snap to columns** and then position cards manually. The form will continue snapping to 12 columns, but you can also hold down the Alt or Ctrl+Shift keys after starting a resize or reposition to override the snap points. For more information, see [alternate behavior keyboard shortcuts](keyboard-shortcuts.md#alternate-behavior).
176
176
177
-
In our example, the four components that make up the third line of the address all have exactly the same width. But this may not be the best layout, as city names are longer than state abbreviations, and the Text input box for countries/regions is short due to the length of its label. To optimize this space, turn off **Snap to columns** in the right-hand pane and then hold down the Alt or Ctrl+Shift keys after starting to size and position these cards. For
177
+
In our example, the four components that make up the third line of the address all have exactly the same width. But this may not be the best layout, as city names are longer than state abbreviations, and the Text input box for countries/regions is short because of the length of its label. To optimize this space, turn off **Snap to columns** in the right-hand pane and then hold down the Alt or Ctrl+Shift keys after starting to size and position these cards.
178
178
179
179
After careful positioning, the result has appropriate sizes for each field and even spacing horizontally between fields:
180
180
@@ -185,8 +185,8 @@ In summary, what are the differences when **Snap to columns** is on versus off?
185
185
| Behavior | Snap to columns On | Snap to columns Off |
186
186
| --- | --- | --- |
187
187
| Resize snaps to |Number of columns you select:<br>1, 2, 3, 4, 6, or 12 |12 columns |
188
-
| Resize snap can be overriden|No |Yes, with Alt or Ctrl+Shift keys after starting the resize |
189
-
| Cards automatically re-layout between rows (more on this later) |Yes |No |
188
+
| Resize snap can be overridden|No |Yes, with Alt or Ctrl+Shift keys after starting the resize |
189
+
| Cards automatically relayout between rows (more on this later) |Yes |No |
190
190
191
191
## Set width and height
192
192
As with everything in Power Apps, the form's layout is governed by properties on the card controls. As already described, you can change the values of these properties by dragging controls to different locations or dragging grab handles to resize controls. But you'll discover situations in which you'll want to understand and manipulate these properties more precisely, especially when making your forms dynamic with formulas.
@@ -217,7 +217,7 @@ You can use this behavior to create a fully dynamic layout, where cards are plac
217
217
### Filling spaces: WidthFit
218
218
The overflow in the last example created a space after the **Order status** card, which was the second card in the first row. We could manually adjust the **Width** properties of the two remaining cards to fill this space, but this approach is tedious.
219
219
220
-
As an alternative, use the **WidthFit** property. If this property is set to **true** for one or more cards in a row, any remaining space on the row will be evenly divided between them. This behavior is why we said earlier that the **Width** property of a card is a *minimum*, and what is actually seen can be wider. This property will never cause a card to shrink, only expand.
220
+
As an alternative, use the **WidthFit** property. If this property is set to **true** for one or more cards in a row, any remaining space on the row will be evenly divided between them. This behavior is why we said earlier that the **Width** property of a card is a *minimum*, and what is seen can be wider. This property will never cause a card to shrink, only expand.
221
221
222
222
If we set **WidthFit** to **true** on the **Order status** card, it fills the available space, while the first card remains unchanged:
223
223
@@ -227,7 +227,7 @@ If we also set **WidthFit** to **true** on the **Order date** card, both cards w
227
227
228
228

229
229
230
-
Note that grab handles on these cards take into account the extra width provided by **WidthFit**, not the minimum width provided by the **Width** property. It can be confusing to manipulate the **Width** property while **WidthFit** is turned on; you may want to turn it off, make changes to **Width**, and then turn it back on.
230
+
Grab handles on these cards take into account the extra width provided by **WidthFit**, not the minimum width provided by the **Width** property. It can be confusing to manipulate the **Width** property while **WidthFit** is turned on; you may want to turn it off, make changes to **Width**, and then turn it back on.
231
231
232
232
When might **WidthFit** be useful? If you have a field that is used only in certain situations, you can set its **Visible** property to **false**, and the other cards on the row will automatically fill the space around it. You might want to use a formula that shows a field only when another field has a particular value.
233
233
@@ -263,7 +263,7 @@ The **Text** property of this control is set to **Parent.Error**, which is used
263
263
264
264

265
265
266
-
Let's make the error message a little longer, and again the control and the card grow to accommodate. Note that the row overall grows in height, retaining vertical alignment between the cards:
266
+
Let's make the error message a little longer, and again the control and the card grow to accommodate. The row overall grows in height, keeping vertical alignment between the cards:
267
267
268
268

0 commit comments