New Tip - ...scroll a TScrollBox with the Up/Down arrows ?

  • From: "SwissDelphiCenter.ch" <newsletter@xxxxxxxxxxxxxxxxxxxx>
  • To: sdcnewtip@xxxxxxxxxxxxx
  • Date: Fri, 8 Mar 2002 08:44:09 +0100

* SwissDelphiCenter new Tip newsletter
* www.swissdelphicenter.ch
*
* To unsubscribe send a mail to sdcnewtip-request@xxxxxxxxxxxxx with the
* subject unsubscribe


Hallo,

Folgender neuer Tip ist neu auf SwissDelphiCenter verfügbar:

Besuchen Sie die Programmier Tips unter 
http://www.swissdelphicenter.ch/de/tipsindex.php


Bewerten Sie diesen Tip nach Schwierigkeitsgrad, Nützlichkeit und Gesamthaft auf
http://www.swissdelphicenter.ch/de/showcode.php?id=1051



Autor:
P. Below <>
http://www.teamb.com


-------------
...eine TScrollBox mit auf/ab-Tasten scrollen ?
-------------
Kategorie: VCL



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 < 0 or Position > Range
      VK_DWON: Position := Position + Increment; // down arrow key
      VK_Up: Position   := Position - Increment; // up arrow key
      else
        inherited;
    end;
  end;
end;




Best Regards
SwissDelphiCenter Team
www.swissdelphicenter.ch
[automatisch generierte EMail]


----------------------------------------------------
ENGLISH NEWSLETTER
----------------------------------------------------

Hi,

This new tip is new available on SwissDelphiCenter.ch:

Visit the programming tips at http://www.swissdelphicenter.ch/en/tipsindex.php


Rate this tip after skill, useful and overall at
http://www.swissdelphicenter.ch/en/showcode.php?id=1051



Author:
P. Below <>
http://www.teamb.com


-------------
...scroll a TScrollBox with the Up/Down arrows ?
-------------
Category: VCL



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 < 0 or Position > Range
      VK_DWON: Position := Position + Increment; // down arrow key
      VK_Up: Position   := Position - Increment; // up arrow key
      else
        inherited;
    end;
  end;
end;



Best Regards
SwissDelphiCenter Team
www.swissdelphicenter.ch
[automatic generated EMail]

Other related posts:

  • » New Tip - ...scroll a TScrollBox with the Up/Down arrows ?