Mega Code Archive

 
Categories / Delphi / VCL
 

Scroll a TScrollBox with the UpDown arrows

Title: scroll a TScrollBox with the Up/Down arrows? private procedure CMDialogKey(var Msg: TCMDialogKey); message CM_DIALOGKEY; end; implementation procedure TForm1.CMDialogkey; begin with Scrollbox1.VertScrollBar do begin case Msg.CharCode of // Delphi takes care of Position Range VK_DWON: Position := Position + Increment; // down arrow key VK_Up: Position := Position - Increment; // up arrow key else inherited; end; end; end;