[Seaside] Icons in Seaside app

Ben Schroeder bschroeder at procro.com
Wed Apr 14 15:32:19 CEST 2004


Hi Germán,

> I want to use icons instead of text links in a Seaside app, 
> may be the same
> icons in use in the 3.7 image.
> 
> Also wants to be able to show a "tooltip" (aka ballon-help) 
> when the mouse
> is over the rendered icon.
> 
> Does exist some example about it?

I'm not sure about an example elsewhere, but here's what we did in an app here recently.  Anything you put inside the second parameter to anchorWithAction:do: gets linked.  You can show a Squeak Form object as an HTML image - something like

	html
		anchorWithAction: [self showCommentsPage]
		do:
			[html attributes: {#border -> 0}.
			html imageWithForm: self class commentsImage].

(commentsImage answers a Form with the comments icon.)

The #border -> 0 avoids showing a link border around the icon on the page.

Tooltips are also easy - just use the 'title' attribute of any element.

	html
		anchorWithAction: [self showCommentsPage]
		do:
			[html attributes: {#border -> 0. #title -> 'Show comments'}.
			html imageWithForm: self class commentsImage].

Hope this helps,
Ben Schroeder


More information about the Seaside mailing list