RU
EN
Главная страница
Скачать
Дополнения
Форум
Блог
Обратная связь
Пожалуйста,
войдите
или
зарегистрируйтесь
.
1 час
1 день
1 неделя
1 месяц
Навсегда
Войдите, используя имя пользователя и пароль, и указав продолжительность сессии.
Начало
Помощь
Поиск
Вход
Регистрация
Новости:
Правила форума
AIMP Forum
»
AIMP for Windows
»
Skin Editor, Skin Engine
»
Вопросы
(Модератор:
Tarik
) »
To hide the container if its children are not visible
« предыдущая тема
следующая тема »
Печать
Страницы: [
1
]
Вниз
Автор
Тема: To hide the container if its children are not visible (Прочитано 3437 раз)
0 Пользователей и 1 Гость просматривают эту тему.
To hide the container if its children are not visible
«
:
Апреля 27, 2014, 05:36:05 »
baram
Новичок
Сообщений: 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.
«
Последнее редактирование: Апреля 23, 2015, 15:06:11 от Tarik
»
Записан
Печать
Страницы: [
1
]
Вверх
« предыдущая тема
следующая тема »
AIMP Forum
»
AIMP for Windows
»
Skin Editor, Skin Engine
»
Вопросы
(Модератор:
Tarik
) »
To hide the container if its children are not visible