Jump to content
uniGUI Discussion Forums
herculanojs

UnimCarousel / UnimCarouselPage - property visible

Recommended Posts

Hi,

 

Can you try to use this approach for now ?!:

 

"Hide", for example:

procedure TMainmForm.UnimFormReady(Sender: TObject);
begin
  UnimCarousel1.RemoveControl(UnimCarouselPage1);
end;

"Show", for example:

UnimCarousel1.InsertControl(UnimCarouselPage1);
UnimCarousel1.ActivePage := UnimCarouselPage1;

Best regards,

Share this post


Link to post
Share on other sites
The problem with hiding and removing pages from UnimCarousel persist.

In the example there are 5 pages, of which 4 should be hidden because they will be accessed through the option in the code.

Even though using the carousel control removal code, pages are still being counted.

 

 for i: = UnimCarousel1.PageCount - 1 downto 0 of

 begin

         if UnimCarousel1.Pages .Tag <0 then

         begin

                 UnimCarousel1.Pages .Visible: = false;

                 UnimCarousel1.RemoveControl (UnimCarousel1.Pages );

         end;

 end;

 

UnimCarousel1.Refresh; This does not seem to work either

 

What can we do to solve the problem?

post-1670-0-47959400-1521578005_thumb.png

post-1670-0-41902400-1521578014_thumb.png

post-1670-0-07725900-1521578020_thumb.png

post-1670-0-97669800-1521578028_thumb.jpg

Share this post


Link to post
Share on other sites

UnimCarousel1.RemoveControl "uniguiclasses.pas"  >> Will it trigger the existing event in unit unimCarousel?

If this does not fire, the list is apparently not updated


 

unit unimCarousel;

 

procedure TUnimCarousel.RemovePage(APage: TUnimCarouselPage);

begin

  APage.FCarousel := nil;

  FPages.Remove(APage);

  if FPages.Count=0 then

    FPageIndex := -1

  else if FPageIndex>=FPages.Count then

  begin

//    if (not IsDestroying) and (not IsLoading) then

//      SetTabIndex(FPages.Count-1);

  end;

end;

Share this post


Link to post
Share on other sites
I tried to work around the problem by creating multiple unimcarousel, so I came across another bug

Even though the UnimCarousel property is visible = false, the unimcarouselpages are still displayed.

Share this post


Link to post
Share on other sites

×