Shoutbox

[Solved] Borderless transparent button? - 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: [Solved] Borderless transparent button? (/showthread.php?tid=63009)

[Solved] Borderless transparent button? by pollolibredegrasa on 07-10-2006 at 10:47 PM

Is it possible to have a totally transparent button?

I have an image as the background of one of my windows, and I want to make certain areas clickable (sort of like an image map). I have placed the buttons over these areas transparently, and this works well. Apart from one small problem:

I have the following in my XML file, which makes the buttons transparent, but I get an annoying white border around the edge of the buttons which I can't seem to get rid of (it vanishes when the mouse hovers over the button and when the button is pressed, but returns when the mouse moves away). Any clues? :undecided:

code:
            <Control xsi:type="ButtonControl" Id="BtnClose">
                <Position Left="215" Top="163" Width="76"/>
                <CustomGradient>
                    <Normal>
                        <Color1><Red>0</Red><Green>0</Green><Blue>0</Blue><Alpha>000</Alpha></Color1>
                        <Color2><Red>0</Red><Green>0</Green><Blue>0</Blue><Alpha>000</Alpha></Color2>
                        <Shadow>false</Shadow>
                    </Normal>
                    <Hot>
                        <Color1><Red>0</Red><Green>0</Green><Blue>0</Blue><Alpha>000</Alpha></Color1>
                        <Color2><Red>0</Red><Green>0</Green><Blue>0</Blue><Alpha>000</Alpha></Color2>
                    </Hot>
                    <Pushed>
                        <Color1><Red>0</Red><Green>0</Green><Blue>0</Blue><Alpha>000</Alpha></Color1>
                        <Color2><Red>0</Red><Green>0</Green><Blue>0</Blue><Alpha>000</Alpha></Color2>
                    </Pushed>
                </CustomGradient>
                <Caption>Close</Caption>            </Control>

I've already tried using Images of the buttons on the buttons themselves, but positioning them right was too much of a hastle and just looked dodgy in the end.

RE: [Help] Borderless transparent button? by Volv on 07-11-2006 at 08:40 AM

Just put an image element with no image (or a static control with no content) and use the standard 'OnWindowidEvent_CtrlClicked()' event.


RE: [Help] Borderless transparent button? by pollolibredegrasa on 07-11-2006 at 09:43 AM

I looked at that but in the documentation it says:

The OnWindowidEvent_CtrlClicked event is fired when a ButtonControl, a CheckBoxControl, a RadioControl, a MenuButtonControl or a LinkControl is clicked.

So this wouldn't work. :(


RE: [Help] Borderless transparent button? by alexp2_ad on 07-11-2006 at 10:18 AM

Making an invisible button is simple, just give it a custom look instead of a custom gradient.

<CustomLook>

you give it a hot, normal and pushed thing as with the customgradientand if you leave the custom look tag empty, it'll be invisible, if you want text where the button is, just put a StaticControl inside the custom look tags.  Basically with custom look, you can make a button look like any other control or element.  You could scrap the image element and put it inside the custom look for the button instead.


RE: [Solved] Borderless transparent button? by pollolibredegrasa on 07-11-2006 at 01:35 PM

Thanks alexp2_ad, that worked :)