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:

  1. Label is not aligned to client
  2. Edit is not aligned to client
  3. 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.
Marshal inspecting demo FMX application showing app info

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.

  1. Click on the Edit1 to make it active in the main form.
  2. Switch to the Marshal form and then right click on the form to show Go To Active and then select it.

Marshal go to active front end navigation
Now we will use Object Plus to modify the alignment from center to client. Object inspector modify align control


The final result is here:

Control align property changed client result

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

. TListbox inspect properties width style
Now modify the width property to 300. Here is the result and now we can read the entire text. TListbox property width change result

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. TLabel align property changed component
Now modify the alignment to client and here is the result. TLabel align client change result

Review the Session

Continue on by reviewing the session Session Review