[Zope-PTK] Retro-GUI Widgets
Spicklemire, Jerry
Jerry.Spicklemire@IFLYATA.COM
Thu, 10 Aug 2000 11:14:00 -0500
Hi PTK Fans,
After going over the posts from yesterday it looks like a few
points got glossed over:
Chris was asking about "transparent" images, which I didn't
quite catch, at first. Chris points out that one benefit of
tranparency is that, since the background color of the cell
should show through, so a single file can be "recycled" as a
spacer in any cell, regardles of color.
Another good point is that when a link is anchored to an image,
the entire image is "clickable". This gives a usability advantage
to a link on a single pixel transparent image that gets re-sized
to fill an entire table cell, usability is improved, over a cell
with just clickable text. The appearance of the text
(alt='alt_text') should be controllable by class='style' in the
<td> tag, but I need to test this to see whether text in alt=''
acts similarly to table cell content, in terms of postioning,
formatting, etc., when it's "under" a transparent image.
So, now we're talking about using a transparent image to overlay
the links, rather than as a spacer for all the cells that make
up the shading. Also, by assigning a name='link_name' within the
<img> tag, one image can be recycled to carry out any number of
actions, via JavaScript.
Beyond transparent images, the notion of generating images brings
up some interesting possibilities to reduce clutter. For example,
there are lot's of cases in the example where the hi-lighted edge
of one tab is adjacent to the "low-lighted" edge of another. In
these cases a single two pixel image could do the job. Then the
advantages of caching, and reusing one image apply here as well.
Since we know the final cell size ahead of time, the images will
render faster than with dynamic re-sizing. By adopting a naming
convention a "library" of shading images could be built up on by
generating non-existent images, on demand, but only when the named
image doesn't yet exist.
Also, Paul asked if it would be possible to apply the example to
"pages", but using layers, each tab linking to a JavaScript action
to bring the corresponding layer "to the top". I started an example
page, but that led to the conclusion that it would almost be
simpler to build the Zope pieces to compose this solution, than
hand coding a sample page.
So, that's what I'll do.
Later,
Jerry S.