Exercise 1 : Label and Edit
This exercise uses the demo applications to get familiar with Object Plus and Marshal. The form has alignment and width issues for practice.
The problems are:
-
Label is not aligned to client
-
Edit is not aligned to client
-
List box is not wide enough
Start the FMX demo and then click on Marshal. Marshal creates its own form so that you can put it next to your application or on a second monitor. I will show them side by side in this exercise.
Edit1 Alignment
Edit1 should read “The Quick Brown Fox Jumped over the lazy moon”, but only “ver the lazy moon” is visible. To fix this you will use Marshal to start an Object Plus Inspector for Edit1 by locating it in the navigation tree. Marshal provides a context menu to “Go To Active” which will navigate the tree to the active control.
-
Click on the Edit1 to make it active in the main form.
-
Switch to the Marshal form and then right click on the form to show Go To Active and then select it.
Now we will use Object Plus to modify the alignment from center to client.
The final result is here:
Listbox1 Width
In this step you will use Object Plus to modify the width of the listbox1. Navigate up to the listbox1 to open an Object Plus inspector for this control. Scroll down in the properties to width
.
Now modify the width property to 300. Here is the result and now we can read the entire text.
Label1 Alignment
In this step you will use Object Plus to modify the alignment of Label1. Navigate to listboxitem1 and expand it to show Label1.
Now modify the alignment to client and here is the result.
Review the Session
Continue on by reviewing the session Session Review