EDOBE XDOM TAKE 6 IR - PRODUCTSHEET Specifikace Strana 94

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 304
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 93
CHAPTER 4: User-Interface Tools Automatic layout 94
} \
}, \
workInfo: Panel { orientation: ’column’, \
text: ’Work Info’, \
name: Group { orientation: ’row’, \
s: StaticText { text:’Company name:’ }, \
e: EditText { characters: 30 } \
} \
}, \
buttons: Group { orientation: ’row’, alignment: ’right’, \
okBtn: Button { text:’OK’, properties:{name:’ok’} }, \
cancelBtn: Button { text:’Cancel’, properties:{name:’cancel’} } \
} \
}";
win = new Window (res); win.center(); win.show();
To make the buttons to appear at the right of the dialog, the buttons group overrides the fill alignment
of its parent (the dialog), and specifies
alignment='right'.
Creating dynamic content
Many dialogs need to present different sets of information based on the user selecting some option within
the dialog. You can use the
stack orientation to present different views in the same region of a dialog.
A
stack orientation of a container places child elements so they are centered in a space which is wide
enough to hold the widest child element, and tall enough to contain the tallest child element. If you
arrange groups or panels in such a stack, you can show and hide them in different combinations to display
a different set of controls in the same space, depending on other choices in the dialog.
For example, this dialog changes dynamically according to the users choice in the
DropDownList.
The following script creates this dialog. It compresses the “Personal Info” and “Work Info” panels from the
previous example into a single
Panel that has two Groups arranged in a stack. A DropDownList allows the
user to choose which set of information to view. When the user makes a choice in the list, its
onChange
function shows one group, and hides the other.
Zobrazit stránku 93
1 2 ... 89 90 91 92 93 94 95 96 97 98 99 ... 303 304

Komentáře k této Příručce

Žádné komentáře