Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 3 of 3 total
Thread TPagePanel - ScrollNext and ScrollPrior
Tue, Nov 24 2015 10:19 AMPermanent Link

Walter Matte

Tactical Business Corporation


TPagePanel - I don't see ScrollNext, or ScrollPrior  methods changing the Page.

I can change pages via the Pages[index] property fine.


procedure TForm1.btnPrior1Click(Sender: TObject);
begin
 PagePanel1.ScrollPrior;    // Nothing Happens
end;

procedure TForm1.btnNext1Click(Sender: TObject);
begin
 PagePanel1.ScrollNext;   // Nothing Happens
end;


procedure TForm1.btnNextClick(Sender: TObject);
begin
 if PagePanel1.ActivePage.Index < PagePanel1.PageCount - 1 then
   PagePanel1.ActivePage := PagePanel1.Pages[PagePanel1.ActivePage.Index + 1];
end;

procedure TForm1.btnPriorClick(Sender: TObject);
begin
 if PagePanel1.ActivePage.Index > 0 then
   PagePanel1.ActivePage := PagePanel1.Pages[PagePanel1.ActivePage.Index - 1];
end;

Walter
Tue, Nov 24 2015 12:15 PMPermanent Link

Raul

Team Elevate Team Elevate

On 11/24/2015 10:19 AM, Walter Matte wrote:
> TPagePanel - I don't see ScrollNext, or ScrollPrior  methods changing the Page.

I think the manual is actually not correct here - these scroll the pages
visible on the page toolbar if you have more pages than are visible and
they work ok here for this purpose (same effect as those small
directional scrolling arrows on panelpage).

If you're looking to just move active page then NextPage/PriorPage would
work better but I believe you'd need to do something like

PagePanel1.ActivePage := PagePanel1.NextPage(PagePanel1.ActivePage);


Raul
Tue, Nov 24 2015 12:38 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Walter,

<< TPagePanel - I don't see ScrollNext, or ScrollPrior  methods changing the Page. >>

Raul is correct - the manual is wrong.  Originally the Scroll* methods were doing what they say, but then were changed when I started distinguishing between scrolling vs. changing the active page.

Tim Young
Elevate Software
www.elevatesoft.com
Image