Ignore:
Timestamp:
May 27, 2019, 12:06:17 AM (5 years ago)
Author:
chronos
Message:
  • Added: More DPI aware components.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • DpiControls/Demo/UFormMain.pas

    r534 r535  
    1616    ButtonNewDpiForm: TButton;
    1717    Label1: TLabel;
     18    Timer1: TTimer;
    1819    TrackBar1: TTrackBar;
    1920    procedure ButtonNewDpiFormClick(Sender: TObject);
    2021    procedure FormShow(Sender: TObject);
     22    procedure Timer1Timer(Sender: TObject);
    2123    procedure TrackBar1Change(Sender: TObject);
    2224  private
    2325
    2426  public
    25 
     27    Redraw: Boolean;
    2628  end;
    2729
     
    4244end;
    4345
     46procedure TFormMain.Timer1Timer(Sender: TObject);
     47begin
     48  Redraw := False;
     49  DpiScreen.Dpi := TrackBar1.Position;
     50end;
     51
    4452procedure TFormMain.ButtonNewDpiFormClick(Sender: TObject);
    4553var
     
    5563procedure TFormMain.TrackBar1Change(Sender: TObject);
    5664begin
    57   DpiScreen.Dpi := TrackBar1.Position;
     65  Redraw := True;
    5866end;
    5967
Note: See TracChangeset for help on using the changeset viewer.