MouseWheel in FrxPreview

Hi,
how can I enable the mousewheel for scrolling up/down the previewpages in TfrxPreview ?

Kind regards,
Steffen

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 7:38AM
    you must write your own handler for the form on which the tfrxpreview componet is located.
    see the programmers manual creating a custom preview.
  • edited 7:38AM
    Thanks, works fine.
  • edited 7:38AM
    tell mee too please. im beginner . how will i enable scroll in frxpreview ??
    thanks in advance
  • edited 7:38AM
    calikmurat wrote: »
    tell mee too please. im beginner . how will i enable scroll in frxpreview ??
    thanks in advance

    I'm looking at exactly the same thing ... anyone?
  • edited 7:38AM
    It's actually easier than I thought it would be to implement;

    Set the onMouseWheelDown and onMouseWheelUp events from the form that holds frxPreview.
    This works great on my reports (watch the -20 for down and 20 for up);

    procedure TForm1.[b]FormMouseWheelDown[/b](Sender: TObject; Shift: TShiftState;
      MousePos: TPoint; var Handled: Boolean);
    begin
      [b]frxPreview1.MouseWheelScroll(-20,false,false);[/b]
    end;
    
    procedure TForm1.[b]FormMouseWheelUp[/b](Sender: TObject; Shift: TShiftState;
      MousePos: TPoint; var Handled: Boolean);
    begin
      [b]frxPreview1.MouseWheelScroll(20,false,false);[/b]
    end;
    

Leave a Comment