pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Todd Volkert <tvolk...@gmail.com>
Subject Re: How To Specify Location of Image in wtkx file
Date Tue, 17 Nov 2009 14:01:01 GMT
Hi Bob,

The images folder will need to be on the classpath to make it work.  Once
that's set, then you should be able to say <ImageView image="images/foo.png"
/>.  Behind the scenes, this finds the image by its resource name (
http://incubator.apache.org/pivot/1.3/docs/api/org/apache/pivot/wtk/ImageView.html#setImage(java.lang.String)
)

Hope that helps,
-T

On Tue, Nov 17, 2009 at 8:53 AM, Bob Santos <bob.santosjr@gmail.com> wrote:

> Hi All!
>
> I am trying to replicate the example in the Labels and Image Views section
> of the tutorials. I've been looking for something that will help me in the
> documentation, unfortunately I found nothing or I'm just looking at the
> wrong places.
>
> I just want to ask how do I specify the location of an image in "main.wtkx"
> located in the "image" folders if I have this directory layout.
>
> I [image:
> ?ui=2&view=att&th=1250267720e5e1b3&attid=0.1&disp=attd&realattid=ii_1250267720e5e1b3&zw]
>
> And here's the content of "main.wtkx":
>
> <Window title="Hello Pivot" maximized="true"
>     xmlns:wtkx="http://pivot.apache.org/wtkx"
>     xmlns="org.apache.pivot.wtk">
>     <content>
>         <BoxPane styles="{padding4, verticalAlignment'center'}">
>             <ImageView image="?" cursor="link" />
>             <Label text="Add Table" styles="{font'Georgia bold 10'}" />
>         </BoxPane>
>     </content>
> </Window>
>
>
> Thanks and Regards,
>
> Bob Santos
>

Mime
View raw message