Re: [xwt-users] Question about buttons

Charles Goodwin <[email protected]>
Newsgroups gmane.comp.java.xwt.users
Organization XWT Foundation
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.