Shoutbox

Image Objects - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: Scripting (/forumdisplay.php?fid=39)
+----- Thread: Image Objects (/showthread.php?tid=65974)

Image Objects by Spunky on 09-08-2006 at 03:42 PM

Is there any way to make an image element "clickable"? I want to show a bunch of colour tiles that the user can click and stuff happens (without gving too much away lol)


RE: Image Objects by Felu on 09-08-2006 at 03:47 PM

quote:
Originally posted by SpunkyLoveMuff
Is there any way to make an image element "clickable"? I want to show a bunch of colour tiles that the user can click and stuff happens (without gving too much away lol)
Try putting a hidden control over the image element and trigger click on the hidden object *-).
RE: Image Objects by Spunky on 09-08-2006 at 03:51 PM

I didn't realise there was a hidden control else I would have lol... Gone looking for it now

EDIT: I might be dumb, but I just can't find it in the "Interface Windows Schema Documentation"


RE: Image Objects by Dempsey on 09-08-2006 at 04:01 PM

There isn't a literal 'HiddenControl'  but you can add a button and make it 'invisile'


RE: Image Objects by Spunky on 09-08-2006 at 04:03 PM

That makes more sense :D It's probably gonna take me ages to do all this though :p thanks for the help guys


RE: Image Objects by Felu on 09-08-2006 at 04:03 PM

quote:
Originally posted by Dempsey
There isn't a literal 'HiddenControl'  but you can add a button and make it 'invisile'
Yeah... Thats what i meant :p. Sorry for not being clear enough :$.
RE: Image Objects by Spunky on 09-08-2006 at 04:06 PM

Nah, it was my fault. Just with other languages you cna actually get hidden controls...

So if a control isnt visible it can still be clicked?


RE: Image Objects by RaceProUK on 09-08-2006 at 04:09 PM

quote:
Originally posted by SpunkyLoveMuff
So if a control isnt visible it can still be clicked?
I wouldn't guarantee it, though it does sound likely. Give it a try ;)
RE: Image Objects by Matti on 09-08-2006 at 04:12 PM

I don't think hidden controls can trigger a click event. However, you can make a ButtonControl on top of the image with a CustomLook with nothing in. :)


RE: RE: Image Objects by alexp2_ad on 09-08-2006 at 04:14 PM

Best way to do it is add a button and in the CustomLook section you can add an image element.

Although having an invisible button and a seperate image element does work as well.


RE: Image Objects by CookieRevised on 09-08-2006 at 05:40 PM

If an invisible control can be clicked/manipulated by the user I actually consider this as a bug!

Any any other language I know (and in Windows in general) an invisble control shouldn't be able to be manipulated by the user.

So, I wouldn't use that method (if it works at all, didn't tested it) as that might not be possible anymore in the future when this is fixed.


RE: RE: Image Objects by alexp2_ad on 09-08-2006 at 05:57 PM

quote:
Originally posted by CookieRevised
If an invisible control can be clicked/manipulated by the user I actually consider this as a bug!

Any any other language I know (and in Windows in general) an invisble control shouldn't be able to be manipulated by the user.

So, I wouldn't use that method (if it works at all, didn't tested it) as that might not be possible anymore in the future when this is fixed.

:o

But then the second part of the easter egg wouldn't work. :P
RE: Image Objects by Eljay on 09-08-2006 at 06:01 PM

quote:
Originally posted by CookieRevised
If an invisible control can be clicked/manipulated by the user I actually consider this as a bug!

Any any other language I know (and in Windows in general) an invisble control shouldn't be able to be manipulated by the user.

So, I wouldn't use that method (if it works at all, didn't tested it) as that might not be possible anymore in the future when this is fixed.

its not so much an invisible control, as a control with an image that is 100% transparent :P
RE: Image Objects by CookieRevised on 09-09-2006 at 03:29 AM

quote:
Originally posted by alexp2_ad
But then the second part of the easter egg wouldn't work. :P
why not? It is perfectly possible that the control which is responsible for the second part is actually the image itself, you don't need a special button. It only requires to check the mouse positions to perform or not perform the second part when the user does to the image what he needs todo.

quote:
Originally posted by Eljay
its not so much an invisible control, as a control with an image that is 100% transparent :P
well that's something different then... in that case the control is still visible in the true sense (property 'visible' is true), so it is controleable also... yep.

But if the property 'visible' of a control is false, it can't be (shouldn't be able to be) controlled.

PS: if you are refering to the second part of the easter egg, there is no control with a transparent image for that only (see code). It is most likely done as explained above to alexp2_ad.

code:
<Elements>
    <Element xsi:type="ImageElement" Id="ImgPic">
        <Position Top="2" Left="3">
            <Units>PosPixels</Units>
        </Position>
        <Image>
            <Name>Papc</Name>
            <Format>JPEG</Format>
        </Image>
    </Element>
</Elements>
<Controls>
    <Control xsi:type="ButtonControl" Id="BtnClose">
        <Position Top="355" Width="75" Left="451">
            <Units>AllPixels</Units>
        </Position>
    </Control>
</Controls>

RE: Image Objects by AberNStein on 09-09-2006 at 03:37 AM

why not just use buttons with images on them?


RE: Image Objects by NanaFreak on 09-09-2006 at 03:39 AM

because it is hard to get the right part of the image and also there is the boarder on the buttons

and hasnt this been dicussed before??


RE: Image Objects by CookieRevised on 09-09-2006 at 03:46 AM

quote:
Originally posted by Jay_Jay
because it is hard to get the right part of the image and also there is the boarder on the buttons
control buttons can be made with a custom look, see scripting documentation.

RE: Image Objects by markee on 09-09-2006 at 07:07 AM

quote:
Originally posted by CookieRevised
quote:
Originally posted by Jay_Jay
because it is hard to get the right part of the image and also there is the boarder on the buttons
control buttons can be made with a custom look, see scripting documentation.
For example radial controls have had their image changed in the plus preferences, screenshot sender, messenger enhancer and the UI that Jay_Jay made radient.  Jay_Jay surely you would have realised it was possible with that (unless you just copy and pasted the xml [Image: msn_tongue.gif]).  These are all good exapmles of where images have been used instead of the normal looking control (radial in this case, though it can be adapted).
RE: Image Objects by matty on 09-09-2006 at 02:53 PM

Use a RadioControl with a custom look. You can add an image into the control making it clickable. Take a look at the XML for Screenshot Sender 4 (WndPref.xml). You will see what I am refering to.

code:
            <Control xsi:type="RadioControl" Id="RadGeneral">
                <Position Top="0" Width="96" Left="0" Height="17"/>
                <Attributes><IsNewGroup>false</IsNewGroup></Attributes>
                <CustomLook>
                    <FocusRect><Left>1</Left><Top>1</Top><Right>1</Right><Bottom>1</Bottom></FocusRect>
                    <Base/>
                    <Normal>
                        <Checked>
                            <Element xsi:type="ImageElement" Id="ImgArrow">
                                <Position Top="0" Left="0"/>
                                <Image><Name>myimage</Name></Image>
                            </Element>
                        </Checked>
                    </Normal>
                </CustomLook>
            </Control>

Here is a small example.