There are two grid classes, hgrid and vgrid. They are container classes like the layout class, but their children have their natural sizes, rather than being sized to fill the layout as far as possible, any placement requests by the children (right, bottom, etc.) are ignored, and the grid objects have no titles - the value of the title attribute is ignored.Visual RepresentationThe hgrid class, unlike the vgrid and layout classes, has a horizontal default arrangement. Objects of the three classes, specified in the same way except for class and the geometry of the horizontal layouts, are shown in the figure below for comparison. The layout and grid backgrounds are shown in a lighter grey to make clear what space the objects occupy. Normally, they would appear in the same shade of grey as the rest of the objects, to present a homogeneous appearance, like the vertical layout with no title.
Points to notice in the figure are:
- The widths of the vertical layouts and grid are determined by the length of the label. The heights of the horizontal layouts and grid are determined by the height of the array.
- In the layouts, objects are increased from their natural sizes to fill the space available for them, causing the array to have a partial column in the vertical layout. The scalar and label objects, however, are constrained vertically, by default, so they are centered (by default) and the extra space is considered part of the layout background.
- In the grids, each object is placed (top left) in the next available space. The grid retains the leftover scraps of space. If c5 and c6 had been bound and their rows attribute set to 3, and then were reparented to the grids, there would not be the two rows of leftover space at the bottom.
a1ûa2ûa3ûa4ûa5ûa6û10 b1ûb2ûb3ûb4û'An object in a layout' b5û'An object in a vgrid' b6û'An object in an hgrid' c1ûc2ûc3ûc4ûc5ûc6û(É10)Ê.*É3 l1û `a1`b1`c1; l2û1 3 Ò`a2`b2`c2; l3û`a3`b3`c3 l4û1 3 Ò`a4`b4`c4; l5û `a5`b5`c5; l6û`a6`b6`c6 ã To show layout background: `l1`l2`l3`l4`l5`l6 has¡ <`bg `gray90 `l1`l2`l3`l4`l5`l6 has¡ `title,¡ <¡ ('Layout';'Layout, horizontal'; ''; ''; 'Vgrid'; 'Hgrid') {`l1`l2`l3`l4`l5`l6 `b1`b2`b3`b4`b5`b6 s.are (4Ò`layout),`vgrid,`hgrid, 6Ò`label;} `c1`c2`c3`c4`c5`c6 has¡ <(`rows;3) show¡ `l1`l2`l3`l4`l5`l6 `l2`l4`l6 has¡<(`x;280) `l3`l4`l5`l6 has¡((`y;240);(`y;240);(`y;450);(`y;450))
Attributes
See the "Display Attributes" chapter for details concerning all the attributes that apply to objects in the hgrid display class, as well as lists of colors and fonts. The keys in the Table of All Display Attributes that pertain to this class are hR, ALL, CNFT, CNT, NFT, and TOP.The attributes that are meaningful for the hgrid display class (other than the print... attributes) are:
active (Point the mouse cursor to an attribute to display a short description at the bottom of the screen)
ancestors
arrowdown
arrowkeys
arrowleft
arrowlist
arrowright
arrowup
at
atsector
b
be
bg
bound
build
children
class
clear
deiconized
descendents
doc
downto
dynamic
eval
evaluate
exit
extent
extents
f1-f12
familytree
fg
fkeys
focus
followers
followertree
font
foot
freeze
fullscreen
H
h
has
head
hide
hl
hlthickness
icon
iconic
iconized
icontitle
incurrentworkspace
is
l
leader
leftto
literal
lower
mapped
naturalsize
newshow
notify
outofcurrentworkspace
parent
pin
position
preset
primary
r
raise
realize
recursively
refresh
reparent
request
reshow
resize
resizeable
rightto
script
sensitive
set
settings
shadowthickness
shell
shelltitle
show
state
stateself
structure
syncshow
t
tabfrom
tablist
tabto
title
titlefg
titlefont
titlejustify
upto
vcol
vcols
verify
vrow
vrows
W
w
ws
X
x
xs
Y
y
ys
YX
yx
yxs
doc@aplusdev.org | © Copyright 19952001 Morgan Stanley Dean Witter & Co. All rights reserved. |