DesktopX: Auto-Hide with no animation

How can we achieve an auto-hide feature that doesn't have the slopoke animation of "Object.AppBarMode = 2"? (when you have more than 100px slidding, the delay is no more acceptable)

I have begun something but now I'm stock with another problem. First, I have created an object with an empty 1px PNG. This object is use to activate the auto-hide feature. So, when you over it, I output some script code to make it disappear and to show the real thing. This new object that I am showing is actually a container for whatever control you want to use. Thisi container is not a rectangle shape and the "Activation" setting is at "Visible area". In this container, I have put script code in the OnLeave event so it can hide himself and re-show the invisible activator.

Code :

'Auto-hide activator
Sub Object_OnMouseEnter
DesktopX.ScriptObject("container").Object.Visible = True
Object.Visible = False
End Sub

'Container
Sub Object_OnMouseLeave
DesktopX.ScriptObject("containerActivator").Object.Visible = True
Object.Visible = False
End Sub


But, as I mentionned, there is a problem with this. When you start adding components on the container, the event Object_OnMouseLeave will be triggered when over those new components, thus resulting in the closing of the container. This really bug me, 'cause I can't find a way to overcome it. > Well, in fact there is a way. This occur 'cause I'm using a non-rectangular PNG for the container. If I was using a rectangular one, there would be no problem 'cause I could set the property "Activation" to "Rectangular area", but that would ruin all the fun of skinning the desktop 'cause the reason why I wanted to skin my Windows was to get rid of this flat rectangle feeling.

Anyone have any idea on this?
1,065 views 7 replies
Reply #1 Top
Just an idea
What if you use a state change (mouse away) for your container and use a If And Else where mousing over the new components And mouse away on container left it visible but mouse away on container only made visible false.

Make sense?
Reply #2 Top
With what I can understand of your post is that I should use an OnStateChange callback to check the mouse event. This code should be found in the container script and it should check wether the mouse is over a components or emptiness. In the last case, it should then make the container dissapear while making the containerActivator visible.

If that's what you mean, then how could I know I'm over a component while beign in the container script? I have check the doc and there is no mention of a way to know the child element of an object.
Reply #3 Top
Maybe a While container is visible, a state change check on container component inside the While Wend statement? This would be inside the If And Else for container visibility. You would then put container component actions inside While Wend statements to perform if state change was true.

I'm not that familiar with VBscript yet or I'd try to write an example. The coding I've done has been in other languages.

This would be an example

If mouse is away from container AND mouse is over container component
Then container is visible

While container is visible
If component is triggered (mouse over, click, etc.)
Then Do something
Wend

Else container is not visible
End If

Don't know if this will work, but hopefully it will get you in the right direction until some better coders come along on this thread.
Reply #4 Top

If mouse is away from container AND mouse is over container component


The "mouse is away from container" is pretty easy to do, but knowing if the mouse is over a component while remaining in the container script (otherwise, I'll be leaving the script and thus resulting in the hidding of the container before I ever arrive to the component), that I don't know I to do. And if you think I'll enter each component's coordinates in the condition, you are really mistaking me.
Reply #5 Top
Could you have an invisible layer over the entire thing that doesnt intercept mouse clicks, but recognizes the mouse positioning?
Reply #6 Top
Oh well, maybe I gave you some ideas.

Reply #7 Top
Oh well, maybe I gave you some ideas.


You sure have pictoratus, but I still got some work to do on this.

Could you have an invisible layer over the entire thing that doesnt intercept mouse clicks, but recognizes the mouse positioning?


I don't see how having another layer would help me. I don't see how I would be able to know when I'm no longer over the image if I use a transparent layer. Check this to see what it looks like :


Since my shape is made out of a circle, I was starting to think that I could check if the mouse coordinate equals a coordinate of the circle's arc. But then again, I think my lack of advance math is rigging at the door.