User's Guide
- In the VisualAge Organizer, select your CardGameApp and create
a new visual part called BlackJackGameView. The Composition
Editor opens on BlackJackGameView.
- Change the window title to Black Jack.
- Add a Container Icon List part to the Window part.
- Add a PlayingCardDeck part to the free-form surface and change
its name to Deal Deck.
- Connect the container's items attribute to the Deal Deck
part's deck attribute.
Open the container's settings and attach each edge of the container to
the corresponding edge of the parent as follows:
- Select the framingSpec property in the Name column
and the ... button in the Value
column.
- In the Framing Spec window, select the Top radio button.
- Select XmATTACHFORM for Attachment type.
- Enter 0 for Offset.
Repeat these two steps, specifying XmATTACHFORM and 0
for the Bottom, Left, and Right radio
buttons.
- Select OK.
In the container's settings, select the
defaultItemIconDescriptor property in the Name column
and the ... button in the Value
column. In the Graphics Descriptor window, specify an icon as
follows:
- Select the Icon radio button.
- Enter abtico50 for the module name and 2 for the
icon ID. This identifies the default icon that the container will use
when displaying each item in the list.
- Select OK.
For the attributeName property, enter faceValue for
the attribute to be displayed and close the settings. Then do the
following:
- Add a toggle button to the free-form surface.
- Change its label text to Refresh.
- Open its settings and specify true for the selection
property. Close the settings.
- Connect the toggle button's selection attribute to the
container's refreshEntireListOnChange attribute. This
connection forces the container to repaint itself whenever its contents
change.
Save your visual part and then select
to test it. You should see a container with icons to the left and text
to the right. All the items should be arranged vertically.
[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]