Kenneth Posted May 12, 2020 Share Posted May 12, 2020 Все добрый день! Создаю в рантайме страницы в TUnimCarousel: pg:=TUnimCarouselPage.Create(UnimCarousel1); UnimCarousel1.InsertControl(pg); Пытаюсь программно переключаться между страницами следующим образом, не работает: UnimCarousel1.PageIndex := i; //or UnimCarousel1.ActivePage := UnimCarousel1.Pages[i]; Если создаю в дизайнере за ранее, все работает, но мне нужно создавать в рантайме. Версия: 1.90.0.1531 Quote Link to comment Share on other sites More sharing options...
Kenneth Posted May 13, 2020 Author Share Posted May 13, 2020 Есть какие нибудь идеи? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted May 13, 2020 Share Posted May 13, 2020 8 minutes ago, Kenneth said: Есть какие нибудь идеи? Добрый день, Мы проверим. Кажется есть "проблема" с добавлением страниц в runtime. Quote Link to comment Share on other sites More sharing options...
Kenneth Posted May 13, 2020 Author Share Posted May 13, 2020 @Sherzod спасибо, очень жду! Quote Link to comment Share on other sites More sharing options...
Sherzod Posted May 13, 2020 Share Posted May 13, 2020 34 minutes ago, Kenneth said: Есть какие нибудь идеи? А что если создать TUnimCarousel также динамически, на данный момент? Quote Link to comment Share on other sites More sharing options...
Kenneth Posted May 13, 2020 Author Share Posted May 13, 2020 Тоже пробовал, результат такой же. Попробую еще раз. Кстати после добавления страниц PageCount всегда равен 0. Как будто ничего не добавилсь, хотя руками карусель прокручивается, а программно не могу прокурить на нужную страницу. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted May 13, 2020 Share Posted May 13, 2020 6 minutes ago, Kenneth said: хотя руками карусель прокручивается Ну думаю как обходное решение, Вы можете создать массив страниц... и попробовать переключаться таким образом: UnimCarousel1.JSInterface.JSCall('setActiveItem', [_Pages[I].JSControl]); Quote Link to comment Share on other sites More sharing options...
Kenneth Posted May 13, 2020 Author Share Posted May 13, 2020 @Sherzod Спасибо, все отлично работает! Quote Link to comment Share on other sites More sharing options...
Sherzod Posted May 13, 2020 Share Posted May 13, 2020 Отлично! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.