Indicator panel with a PageControl  

Send By: Radikal (Q3 Team)
Web : http://www.q3.nu
Email: radikal@q3.nu
Date: 03/08/20

Tip accessed 535 times

 


If we want to put a zone in our form in which we can to be changing its content, for example to show several indicators of situation, or to be showing a few images, curves or any thing that one can place in one form, here you have a quite simple manner to obtain it.


The idea its very simple: to use a PageControl with severals TabSheets.
Into the TabSheets we can put anything to show it, and, with a Timer we can change the page in a defined time interval.
Is we make the Tabs invisible, we can a simple notifier panel.

  • Put a TPageControl (PageControl1) and define several TabSheets in it.

  • Put a TTimer (Timer1)

  • Put this code in the OnTimer event of Timer1:



  •  procedure TForm1.Timer1Timer(Sender: TObject);
     var
       iTemp: integer;
     begin
       iTemp:=PageControl1.ActivePageIndex+1;
       if iTemp=PageControl1.PageCount then iTemp:=0;
       PageControl1.ActivePageIndex:=iTemp;
     end;