Frequently Asked Component Specific Questions

Options

Display all FAQ items

Search FAQ items:


Displaying items 1 to 1 of 1, page 1 of 1

<< previous next >>

TAdvOfficePager
Draw attention to a tab in TAdvOfficePager to make it blink

To do this, make sure the tab is visible when it is not selected by setting AdvOfficePager1.ShowNonSelectedTabs = true and then set custom tab appearance colors for normal & selected state of the tab with:

   // make sure the default style color is used
  AdvOfficePager12.UseTabAppearance := false;
   // initialization of colors
  AdvOfficePager12.TabAppearance.Color := clRed;
  AdvOfficePager12.TabAppearance.ColorTo := clRed;
  AdvOfficePager12.TabAppearance.ColorMirror := clRed;
  AdvOfficePager12.TabAppearance.ColorMirrorTo := clRed;

  AdvOfficePager12.TabAppearance.ColorSelected := clRed;
  AdvOfficePager12.TabAppearance.ColorSelectedTo := clRed;
  AdvOfficePager12.TabAppearance.ColorMirrorSelected := clRed;
  AdvOfficePager12.TabAppearance.ColorMirrorSelectedTo := clRed;

To draw attention to the tab, now let the tab switch between the default style color and the custom color via a timer:

procedure TForm1.Timer1Timer(Sender: TObject);
begin
  if DoAttention then
    AdvOfficePager12.UseTabAppearance := not AdvOfficePager12.UseTabAppearance
 else
     AdvOfficePager12.UseTabAppearance := false;
end;