TsPageControl Effects by Code

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #32773
    wesley bobato
    Participant

    Hello Friend I Once I add a TsPageControl and select the TsTabSheet by Mouse

    Effect is Implemented, but when I change the code pages for the effect is not executed.

    See Example Below.

    sPageControl1.ActivePageIndex: sPageControl1.ActivePageIndex = + 1;

    Effect Executes only when I use the mouse to change the tabsheet.

    Here TsSkinManager configured this way.

    sSkinManager1.AnimEffects.PageChange.Active: = True;

    sSkinManager1.AnimEffects.PageChange.Time: = 100;

    can you help me run the effect of tabsheet when I Altero Pages by code?

    #50297
    Support
    Keymaster

    Hello. Try this code :

    Code:
    const
    AnimTime = 400;
    . . .
    sVCLUtils.PrepareForAnimation(sPageControl1);
    sPageControl1.Perform(WM_SETREDRAW, 0, 0);
    sPageControl1.ActivePageIndex := NewPageindex;
    sPageControl1.Perform(WM_SETREDRAW, 1, 0);
    sVCLUtils.AnimShowControl(sPageControl1, AnimTime);
    RedrawWindow(sPageControl1.Handle, nil, 0, RDW_ERASE or RDW_INTERNALPAINT or RDW_INVALIDATE or RDW_UPDATENOW or RDW_ALLCHILDREN);
    #50291
    wesley bobato
    Participant

    it is possible to implement this so automatically in next version?

    #50285
    Support
    Keymaster

    No, because this effect is not required in most cases, as I know.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.