Tuto WINDEV Mobile 25
Part 3: iOS application 69 ▶ We are now going to modify our window in order for the "Display" Button control to be centered and to remain centered regardless of the device orientation. ▶ Stop the test and go back to the editor. ▶ To center the Button control in the window: 1. Select the Button control (click on the control). 2. On the "Alignment" pane, in the "Centering and distribution" group, click "Center in the parent (horz)". ▶ In order for the Button control to remain centered in the window, we are going to use the control anchoring: 1. Select the control if necessary. 2. Display the popup menu (right mouse click). 3. Select "Anchor": the window for defining anchors is displayed: 4. Select "Horizontally centered" and validate ("OK" button). Remark In the window displayed in the editor, you will notice the little red arrows in the control. These arrows indicate that the control is anchored. ▶ Run the project test in simulator mode ( among the quick access buttons): • The button is centered in portrait mode. • Change the orientation of simulator. • The button remains centered in landscape mode.
Made with FlippingBook
RkJQdWJsaXNoZXIy NDQ0OA==