Tutorial 7 - Page Editor Basics (2)
When going through Maqetta's tutorials, it is suggested that you have two side-by-side
browser windows open, one showing the tutorial, and the other where you run the application
and perform the steps listed in the tutorial.
This tutorial covers the following topics:
- Container widgets vs primitive widgets (i.e., "controls")
- Choose parent preference
- Inline vs block widgets
- Flow vs absolute layout
Container widgets vs primitive widgets (i.e., "controls")
- ⇒
Issue a Create Desktop Application... command.
- ⇒
In the Palette, click on the Containers section to open that section, then
click on the the subsection labelled Dojo.
- ⇒
Drag a TabContainer widget onto the canvas.
When the data entry popup appears, click OK or click away to accept the default values.
- ⇒
In the Palette, click on the Controls section to open that section, then
click on the the subsection labelled TextBox.
- ⇒
Drag a TextBox widget onto the canvas, dropping the Button
inside of the TabContainer.
- ⇒
In the Palette, click on the Controls section to open that section (if not already open), then
click on the the subsection labelled Buttons.
- ⇒
Drag a Button widget onto the canvas, dropping the Button
inside of the TabContainer.
When the data entry popup appears, click OK or click away to accept the default values.
- ⇒
Go to the far-left of the Maqetta window and click on the large Outline
palette button to expose the Outline palette, which shows your document's widget hierarchy.
Note that the Outline shows that the TextBox and Button widgets are nested inside the TabContainer.
In fact, the hierarchy is TabContainer, with two ContentPane children (one for each tab in the TabContainer),
and then the TextBox and Button widgets are children of the first ContentPane.
By default, Maqetta adds new widgets as children of the container widget
at the widget drop location.
- ⇒
Go to the far-left of the Maqetta window and click on the large Palette
palette button to expose the Palette palette to show the widget palette once again.
Choose parent preference
- ⇒
In the main menubar, at the top/right of the application, click on the application settings icon
and then choose "Preferences" to bring up the Preferences dialog.
- ⇒
Turn option "When dragging, show possible parents:" on by clicking on the checkmark for that item,
then click Save to update your preferences.
Note that preference changes stay active forever, even across sessions,
until you change them again.
- ⇒
In the Palette, click on the Controls section to open that section (if not already open), then
click on the the subsection labelled Buttons.
- ⇒
Observe the screen while you perform the following operation.
Drag a ComboButton widget onto the canvas and hover over the TabContainer,
but don't let up on the mouse yet.
Instead, notice that Maqetta shows an annotation next to the mouse that shows
the list of possible parent widgets for the ComboButton. While still holding the mouse,
your screen should look something like this:
- ⇒
Let up on the mouse over the TabContainer so that the ComboBox is dropped into the TabContainer,
and will become a child of the ContentPane (just like what happened previously with the TextBox and Button).
- ⇒
Drag a second ComboButton widget onto the canvas and hover over the white area
under the TabContainer. Notice that the only candidate parent will by the <body>.
- ⇒
While still dragging the ComboButton, move the mouse once again over the TabContainer.
The list of candidate parents will once again show two candidate parents: the ContentPane and the <body>.
- ⇒
While still dragging and hovering over the ContentPane, on your keyboard, press the number "2" key.
Notice that list of candidate parents now has the arrow pointing to the <body>.
At this point, let up on the mouse to complete the drop operation.
The new ComboBox should be added under the TabContainer because you told Maqetta
to choose <body> as the parent, instead of the ContentPane, and as a result,
the ComboBox has become a sibling to the TabContainer. (Note: you can look at the Outline palette
to verify that the ComboBox is indeed a sibling to the TabContainer.)
The choose parent user interface shows both at widget creation time (when dragging/dropping
from the Palette onto the canvas), and when dragging existing widgets around on the canvas.
- ⇒
Click on the file tab's close button -
- to close the page editor. (Click Discard on the Save/Discard/Cancel alert that appears.)
Inline vs block widgets
- ⇒
Issue a Create Desktop Application... command. In the Create Desktop Application dialog,
click the Create button to create a new file with the default filename.
- ⇒
Drag the following widgets onto the canvas:
TextBox, Button, ComboButton, HTML <label>,
Calendar, HTML <div>.
Note that some widgets are added to the right of the previous widget and other widgets are added under the previous widget.
This is because some widgets default as "block-level" widgets, which means they, in effect, also establish their own
separate block (or "paragraph"), whereas other widgets are designed as "inline" widgets, which means they are placed inline
within the current block (or "paragraph") and behave from a layout perspective similar to typed text or small inline images.
Maqetta simply honors the default layout behavior for each widget.
- ⇒
Click on the file tab's close button -
- to close the page editor. (Click Discard on the Save/Discard/Cancel alert that appears.)
Flow vs absolute layout
HTML5 uses CSS for layout and styling. CSS offers two primary layout mechanisms:
- Flow layout - This is the layout you find in text document editors such as
MS Word or Google Docs, where page elements flow left-to-right and then
top-to-bottom.
- Absolute layout - This is the layout you find in drawing programs
where page elements are positioned at fixed (x,y) locations on the page.
- ⇒
Issue a Create Desktop Application... command.
- ⇒
Look at the page editor toolbar for a drop-down button that says either "Flow"
or "Absolute". (Note: it probably says "Flow".) This indicates that the page editor
will add new widgets using flow layout.
- ⇒
Change the Flow/Absolute button to "Absolute".
- ⇒
Drag/drop a Calendar widget onto the canvas.
Notice that the Calendar widget is positioned absolutely at the position where
you dropped the Calendar.
The flow-vs-absolute setting is document-specific and persists throughout the
lifetime of the document, until you change the value.
Click on the Undo icon to remove the Calendar you just added.
- ⇒
Change the Flow/Absolute button back to "Flow".
- ⇒
Once again, drag/drop a Calendar widget onto the canvas.
Notice that the Calendar widget is positioned using flow layout, and ends up at the top/left of the canvas.
- ⇒
Click on the file tab's close button -
- to close the page editor. (Click Discard on the Save/Discard/Cancel alert that appears.)
Previous / Next