What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Can an image be used as a control button?

Can an image be used as a control button?
Author: Message:
Hen
Junior Member
**


Posts: 37
Joined: Aug 2007
O.P. Huh?  Can an image be used as a control button?
Hi,
I want an image I put inside a window to act like a regular control button.
Is this possible, and how?
Thanks.

This post was edited on 04-01-2008 at 12:05 PM by Hen.
03-30-2008 06:02 PM
Profile E-Mail PM Find Quote Report
markee
Veteran Member
*****

Avatar

Posts: 1621
Reputation: 50
35 / Male / Flag
Joined: Jan 2006
RE: Can an image be used as a control button?
Make a button control and use a custom look to achieve this.  This way you don't have to try to do anything crazy to get the image to act like a button.
[Image: markee.png]
03-30-2008 10:58 PM
Profile PM Find Quote Report
Hen
Junior Member
**


Posts: 37
Joined: Aug 2007
O.P. Huh?  RE: Can an image be used as a control button?
Hi,
I turned into a dead end.
I am trying to resolve this in two ways, both did't work for me:
1)
I read:
http://shoutbox.menthix.net/showthread.php?tid=65974&page=1

And then I saw the simplest thing is to do a custom look with no content => the button is invisible.

Then I put an image element at the same spot.
The problem is, the image is bigger than the button.
Then I read:
http://shoutbox.menthix.net/showthread.php?tid=82412&pid=895524

Which talks about the same problem.
However, <MOSAIC> doesnt work, and the problem remains.
Can you help?
Here is the code:

XML :
<Elements>
....
    <Element xsi:type="ImageElement" Id="ImgPlay">
                                <Position Top="10" Left="90" width="10" height="10"/>
        <MOSAIC>ResizeToFit</MOSAIC>
                                <Image><Name>play</Name>
        </Image>
        <Format>JPG</Format>
     </Element>
</Elements>

Js:
Wnd.ImageElmt_SetImageFile('ImgPlay', 'play.jpg');

2)
I tried to do a custom look and insert the picture inside the button:
XML:
<Control xsi:type="ButtonControl" Id="BtnPlay">
                <Position Top="10" Width="20" Left="90" Height="20"/>
                <Caption>Play</Caption>
<CustomLook>
                    <Normal>
                            <Element xsi:type="ImageElement" Id="ImgPlay">
                                <Position Top="10" Left="90" width="10"

height="10"/>
                                <MOSAIC>ResizeToFit</MOSAIC>
                                <Image><Name>play</Name></Image>
                <Format>JPG</Format>
                            </Element>
                    </Normal>
                </CustomLook>
            </Control>

JS code:
Wnd.ImageElmt_SetImageFile('ImgPlay', 'play.jpg');
But here I guess there is a problem to set an image, which is inside custom look. This also was discussed earlier, but with no solution.
If the picture size is bigger than the button, I thought I need here also the MOSAIC command. Anyway, its not working.
It doesnt even show the picture (unlke in (1) where it shows the picture, but its size is huge, and doesnt effect by MOSAIC command).

Thanks a lot!

04-01-2008 12:04 PM
Profile E-Mail PM Find Quote Report
Spunky
Former Super Mod
*****

Avatar

Posts: 3658
Reputation: 61
35 / Male / Flag
Joined: Aug 2006
RE: Can an image be used as a control button?
If the picture is bigger than the button, is best to resize the picture manually and use that version. If a pic is in a CustomLook element it can't be set the same as a normal picture IIRC
<Eljay> "Problems encountered: shit blew up" :zippy:
04-01-2008 05:35 PM
Profile PM Find Quote Report
Hen
Junior Member
**


Posts: 37
Joined: Aug 2007
O.P. RE: RE: Can an image be used as a control button?
quote:
Originally posted by SpunkyLoveMuff
If the picture is bigger than the button, is best to resize the picture manually and use that version. If a pic is in a CustomLook element it can't be set the same as a normal picture IIRC

O.K, so after resizing manually, how do I use the custom look?
As I said - it doesnt show the picture.
and also, if I need to resize it, what's the MOSAIC command for?
Thanks.
04-01-2008 07:04 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On