mousewheel - Delphi Mouse wheel event in component -
i'm wanting write component uses mouse wheel zoom similar google earth.
i have component using onmousewheel , have properties maxzoom minzoom , zoom there better option stretchdraw bitmap i'm trying location of components area in form
what understand have find each parent until find tcustomform , add component's top , components left objects location find objects location. there better way
once have location can zoom map mouse cursor location if mouse on object , zoom from.
has 1 seen code please
it depends on kind of content going zoom ; post here how how long wheel has moved
on private declaration
private { private declarations } procedure formmousewheel(sender: tobject; shift: tshiftstate; wheeldelta: integer; mousepos: tpoint; var handled: boolean); on create or other starting procedure
onmousewheel := formmousewheel; // depends on the formmousewheel comes this
procedure formmousewheel(sender: tobject; shift: tshiftstate; wheeldelta: integer; mousepos: tpoint; var handled: boolean); begin // code here // wheeldelta returns - or + values (in computer -120 , + 120 ; // depends on control panel mouse wheel settings) // if font make font size bigger or // if image // strech := true; // increase width , height of timage //and put them inside scrollbox // end; i checked using vcl form (not inside component ), if want zoom post kind of content want zoom
Comments
Post a Comment