Q&A

  • 커서의 이동 컨트롤 하기..
안녕하십니까?

또다시 델가족 여러분의 도움을 받고자 질문을 합니다.



폼에 TNumberEdit를
1  COMMENTS
  • Profile
    Bluesky 2001.03.03 20:03
    제가 예전에 버튼콘트롤 할때 고민했었던 문제이기도 한데요..

    님의 질문과 달라진것이 버튼 이 edit로 바꾸어진것 밖에 없는것 같네여



    내가 봐도 좀 무식(?)하게 해결을 했거든여?

    더 좋은 방법이 있을것 같지만...



    .

    .

    .

    .

    private

    Procedure CMDialogKey(Var MSG : TCMDiaLogKey); Message CM_DIALOGKEY;



    .

    .

    .

    .



    Procedure TForm1.CMDialogKey(Var MSG : TCMDiaLogKey);

    begin

    if (MSG.CharCode <> VK_right) AND

    (MSG.CharCode <> VK_Left) AND

    (MSG.CharCode <> VK_Down) AND

    (MSG.CharCode <> VK_up) then inherited;

    end;



    .

    .

    .

    .

    .

    .

    procedure TForm1.btnhoiinsuKeyDown(Sender: TObject; var Key: Word;

    Shift: TShiftState);

    begin

    if Key = VK_up then btnjuminsu.SetFocus;

    if Key = VK_Right then btngojumsu.SetFocus;

    if Key = VK_Down then btnsuinsu.SetFocus;

    end;



    procedure TForm1.btnsuinsuKeyDown(Sender: TObject; var Key: Word;

    Shift: TShiftState);

    begin

    if Key = VK_up then btnhoiinsu.SetFocus;

    if Key = VK_Right then btnbonussu.SetFocus;

    if Key = VK_Down then btndohoiin.SetFocus;

    end;



    procedure TForm1.btndohoiinKeyDown(Sender: TObject; var Key: Word;

    Shift: TShiftState);

    begin

    if Key = VK_up then btnsuinsu.SetFocus;

    if Key = VK_Right then btnpicsu.SetFocus;

    if Key = VK_Down then btnhoinumsu.SetFocus;

    end;

    .

    .

    .

    .

    .

    .



    이렇게 각 버튼의 KeyDown 에 하나하나 코딩을 해주었거든여



    즐코하세여~~