RU
EN
Main Page
Download
Addons
Forum
Blog
Feedback
Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Home
Help
Search
Login
Register
News:
Скины для плагина Analog Meter
AIMP Forum
»
AIMP for Windows
»
Skin Editor, Skin Engine
»
Questions
(Moderator:
Tarik
) »
To hide the container if its children are not visible
« previous
next »
Print
Pages: [
1
]
Go Down
Author
Topic: To hide the container if its children are not visible (Read 3642 times)
0 Members and 1 Guest are viewing this topic.
To hide the container if its children are not visible
«
on:
April 27, 2014, 05:36:05 »
baram
Новичок
Posts: 42
Карма: +10/-0
I have this container hierarchy.
parent
- child 1
- child 2
- ...
- child n
I want to hide parent if all children are also non-visible
If parent have no texture, this is easy.
Because parent have no size if its children are all hidden.
But if the parent have some texture, this is very difficult.
Because the parent have minimum size same with its texture size.
There is some possible solution, but I don't think it's perfect.
(solution 1)
Making many custom providers(commutator).
By grouping two children each, the parent will be hidden if all children are also hidden.
child 1 >
child 2
>
child i > > parent
child j
>
child n-1 >
child n
(solution 2)
Making a specific container to indicate parent visibility.
parent
- indicator
- child 1
- ...
- child n
The indicator's attribute are AutoHide = true, AutoHideParentSizeThreshold = parent texture's height or width.
If all children are hidden, the parent's size will be same to its texture size.
So the indicator will be hidden.
And by binding between indicator and parent, you can make parent hidden when its children are all hidden.
But this solution have serious flaw.
I can make parent hidden but can't make it visible again.
Once the parent goes hidden, the indicator's AutoHide mechanism become not working.
Even if I change child's visibility to true, the parent won't be visible again.
So I ask you, how to solve this.
«
Last Edit: April 23, 2015, 15:06:11 by Tarik
»
Logged
Print
Pages: [
1
]
Go Up
« previous
next »
AIMP Forum
»
AIMP for Windows
»
Skin Editor, Skin Engine
»
Questions
(Moderator:
Tarik
) »
To hide the container if its children are not visible