Page Control's Close Button

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #51479
    Support
    Keymaster

      Maybe this code will work:

      Code:
      for i := pg.PageCount-1 downto 0 do
      begin
      pg.CloseClick(pg.Pages);
      end;

      Can you show a demo?

      Why you clicks on buttons in the loop, but not closing pages directly?

      #51492
      mboloz
      Participant

        That code not work, i just got AV

        emm, i just want to make design like browser+desktop feel, and those single button work like logout, so user no need to close one by one

        here just the example i have made, if something wrong please correct it

        #51494
        Support
        Keymaster

          Thank you

          Try this code:

          Code:
          for i := pg.PageCount-1 downto 0 do
          begin
          DeletePage(TsTabSheet(pg.Pages));
          end;
          #51496
          mboloz
          Participant
            'Support' wrote:

            Thank you

            Try this code:

            Code:
            for i := pg.PageCount-1 downto 0 do
            begin
            DeletePage(TsTabSheet(pg.Pages));
            end;

            Hay Thanks too…

            I Tried those code, but there still 1 form left in the docked.. and what i wanted is to close All the docked From

            Would You Fixed it please

            #51497
            Support
            Keymaster

              This code should close all pages:

              Code:
              for i := pg.PageCount – 1 downto 0 do
              pg.Pages.Free;
              #51498
              mboloz
              Participant
                'Support' wrote:

                This code should close all pages:

                Code:
                for i := pg.PageCount – 1 downto 0 do
                pg.Pages.Free;

                😀 Many Thanks, Work like charm..

                let's me try on my application..

                Best Regard

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