View Full Version : view opacity
scorpio
05-20-2004, 03:39 PM
Hi,
I tried creating a view with opacity with some text in it that i want to pop up on the application however when i make the view visible i can see the text but i can also kind of see the area covered by the background view in a very light colour. Is it possible to make a view completely opaque?
thanks.
antun
05-20-2004, 03:45 PM
I'm not sure I understand you - could you post a code snippet?
-Antun
I do it like this to set a view transparent while and only while I move it:
<method event="onmousedown">
classroot.dragger.apply();
classroot.setOpacity(0.4);
</method>
<method event="onmouseup">
classroot.dragger.remove();
classroot.setOpacity(1);
</method>
setting the opacity to 1 make the view totally opaque provided all its ancestors have opacity set to 1 (it is the default setting)
If you see a view behind yours,check if it is not a child of transparent view.
scorpio
05-21-2004, 11:28 AM
hey pep i tried what you did but the problem is sometimes when i refresh the display and redraw the views i can see a view of a very light colour even though this view's opacity has been set to 0.
is this just because of the capabilities of my monitor?
if you want to hide a view set it's visibility to false, then if you still see it it's your monitor...
antun
05-24-2004, 08:53 AM
I tried this:
<canvas>
<view name="foo" width="50" height="50" clickable="true" bgcolor="blue">
<dragstate name="dragger" />
<method event="onmousedown">
this.dragger.apply();
this.setOpacity(0.4);
</method>
<method event="onmouseup">
this.dragger.remove();
this.setOpacity(1);
</method>
</view>
</canvas>
... and it worked fine.
What precisely is "classroot" in your app?
-Antun
Actually, I have similar problems:
As an example, I have this one class that contains several views that occupy different parts of the screen, and changes the cursor when the mouseover event is triggered. All these views are otherwise transparent and should not appear at all (imagine a picture of Mona Lisa, and as you move the mouse to different areas of the pic, the cursor changes).
I don't want any of those mouse-over detecting views to be visible at all, but sometimes they show up with a very light fade on them... much like opacity=0.1 or something...
How can we get around it?? Thanks!
James
antun
06-04-2004, 09:03 AM
I haven't seen anything like that at all. Are you using the opacity attribute of the mouseover views? Can you post an example of this?
-Antun
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.