ImageEn, unit iemview

TImageEnMView.SetModernStyling

TImageEnMView.SetModernStyling


Declaration


procedure SetModernStyling(bAutoGridWidth : Boolean = False; iThumbWidth : Integer = 0; iThumbHeight : Integer = 0; bSoftShadow: Boolean = True);


Description


Call SetModernStyling in FormCreate to update the control with the settings which closely match the current Windows styling.

if bAutoGridWidth is enabled then GridWidth is set to -1. You can also optionally specify default values for GridWidth and GridWidth and add a SoftShadow.

The current implementation of SetModernStyling makes the following changes:

  Style                        := iemsFlat;
  Background                   := clWindow;
  ThumbnailsBackground         := clWindow;
  ThumbnailsBackgroundSelected := $00FCEADA;
  SelectionColor               := $00CEA27D;
  SelectionWidth               := 1;
  TextMargin                   := 4;
  HorizBorder                  := 8;
  VertBorder                   := 8;
  UpperGap                     := 0; (or 4 if bSoftShadow = False)
  BottomGap                    := 0; (or 4 if bSoftShadow = False)
  LeftGap                      := 0; (or 4 if bSoftShadow = False)
  RightGap                     := -1; (which uses the same value as LeftGap)
  TextBackgroundStyle          := bsClear;
  ThumbnailDisplayFilter       := rfFastLinear;
  ThumbnailsBorderWidth        := 1;
  SoftShadow.Radius := 2;
  SoftShadow.OffsetX := 1;
  SoftShadow.OffsetY := 1;
  SoftShadow.Intensity := 50;
  SoftShadow.Enabled := bSoftShadow;



Example


procedure TForm1.FormCreate(Sender: TObject);
begin
  ImageEnMView1.SetModernStyling( True );
end;
    

See Also


- Style
- SetStyleEx
- EnableTheming