Re: [xwt-users] Question about buttons
Eric Merritt <cyberlync-/[email protected]>
| Newsgroups | gmane.comp.java.xwt.users |
|---|---|
| Message-ID | <[email protected]> |
--- Charles Goodwin <[email protected]> wrote: > Eric Merritt wrote: > > <box orient="horizontal" vshrink="true"> > > <button sizetoimage="true" > > id="reload" > > > > image="org.cyberlync.polar.icons.reload"/> > > </box> > > The confusion here is with sizetoimage. > > For sake of demonstration, let's assume the box > structure of a button is > this: > > <template border="buttonborder"> > redirect["image"] = $content; > <box id="content" /> > </template> > > The 'image' is being redirected to the content. The > 'sizetoimage' put > is landing on (in the above structure) the top level > template node. The > top level template has no image, so it tries to size > itself to [0,0]. > However, since it's contents are larger than that, > it is sizing to the > size of the content and hence the border overlaps > the image. > > The content of a button actually runs sizetoimage > anyway (the target is > actually an <icon />). So it's redundant. you want > this instead: > > <button shrink="true" image="..." /> > > - Charlie > Using your example and changing sizetoimage to shrink produces a button about 5x3 pixels where you cant see the image at all (or at least only a quarter of it). I must be missing something somewhere. __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com