Disable Scrollbars in TfrxPreview

edited 3:55AM in FastReport VCL 5
Hi,

I want to disable the scrollbars in TfrxPreview from Delphi. How can I do that?

Comments

  • gpigpi
    edited 3:55AM
    Hello,

    Sorry, but you can't to hide scrollbars without changes of FR's sources:
    see frxCtrls.pas:
    procedure TfrxScrollWin.CreateParams(var Params: TCreateParams);
    const
    BorderStyles: array[TBorderStyle] of DWORD = (0, WS_BORDER);
    begin
      inherited;
      with Params do
        begin
          Style := Style or WS_CLIPCHILDREN or {WS_HSCROLL or //change this line
          WS_VSCROLL or} BorderStyles[FBorderStyle]; //change this line
          if {$IFNDEF FPC}Ctl3D and {$ENDIF} NewStyleControls and (FBorderStyle = bsSingle) then
            begin
              Style := Style and not WS_BORDER;
              ExStyle := ExStyle or WS_EX_CLIENTEDGE;
            end;
      end;
    end;
    

Leave a Comment