Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

setting fixed size for an image in a stack

0 views
Skip to first unread message

c.m.

unread,
Oct 7, 2006, 7:14:01 PM10/7/06
to
Hiya,

I have a code more or less written in this way:

[...]

<hbox id="boxMessage">
<stack>
<image id="messages" src="anImage.png" value="0"/>
<label id="nMessages" value="0" />
</stack>
</hbox>

[...]

The image is 16x16 and my problem is that where nMessages become
larger that the image (eg:99), the image will resized.

Is it possible to fix the size exactly at 16x16 pixels avoiding any
resize?

I tried using "maxWidth" but it didn't work.

Any suggestions?

Many Thanks

c.m.

Neil

unread,
Oct 8, 2006, 5:24:11 AM10/8/06
to
c.m. wrote:

> Hiya,
>
> I have a code more or less written in this way:
>
> [...]
>
> <hbox id="boxMessage">
> <stack>
> <image id="messages" src="anImage.png" value="0"/>
> <label id="nMessages" value="0" />
> </stack>
> </hbox>
>
> [...]
>
> The image is 16x16 and my problem is that where nMessages become
> larger that the image (eg:99), the image will resized.
>
> Is it possible to fix the size exactly at 16x16 pixels avoiding any
> resize?

Simply position the image and it will no longer be stretched to the size
of the stack. <image left="0" top="0"> would seem to suffice.

--
Warning: May contain traces of nuts.

c.m.

unread,
Oct 8, 2006, 12:15:39 PM10/8/06
to
Neil ha scritto:

> c.m. wrote:
>>
>> Is it possible to fix the size exactly at 16x16 pixels avoiding any
>> resize?
>
> Simply position the image and it will no longer be stretched to the size
> of the stack. <image left="0" top="0"> would seem to suffice.
>

It works, buf what if I want to align the two objects on their middle?


Thx


c.m.

Neil

unread,
Oct 8, 2006, 12:46:56 PM10/8/06
to
c.m. wrote:

In that case I would enclose the image in a <box align="center"
pack="center">.

c.m.

unread,
Oct 9, 2006, 8:57:07 AM10/9/06
to
Neil ha scritto:
> c.m. wrote:
>
>> Neil ha scritto:
>>
>>> c.m. wrote:
>>>
>>>> Is it possible to fix the size exactly at 16x16 pixels avoiding any
>>>> resize?
>>>
>>> Simply position the image and it will no longer be stretched to the
>>> size of the stack. <image left="0" top="0"> would seem to suffice.
>>
>> It works, buf what if I want to align the two objects on their middle?
>
> In that case I would enclose the image in a <box align="center"
> pack="center">.
>

Uhm, it doesn't work... anyway it's OK!


Thanks

0 new messages