Q&A

  • 강민주님의 팁중에.. Event Disable한것을 Enable하려면..?
이벤트 Disable시키기



Button1에 OnClick이벤트를 Disable 시킬려면..



Button1.OnClick := nil;



만약 Button1에 OnClick이벤트를 한번만 실행하고 싶을땐

간단하게..



procedure TForm1.Button1Click(Sender: TObject);

begin

ShowMessage('tttttttttt');

Button1.OnClick := nil;

end;



이와 같이하면

Event Disable 되더군요



그런데 다시 Enable하는 방법을 모르겠어서...



알려주시면 정말 감사하겠습니다..



그럼 좋은 하루 되세여....









1  COMMENTS
  • Profile
    강민주 2000.05.27 04:00
    김정식 wrote:

    > 이벤트 Disable시키기

    >

    > Button1에 OnClick이벤트를 Disable 시킬려면..

    >

    > Button1.OnClick := nil;

    >

    > 만약 Button1에 OnClick이벤트를 한번만 실행하고 싶을땐

    > 간단하게..

    >

    > procedure TForm1.Button1Click(Sender: TObject);

    > begin

    > ShowMessage('tttttttttt');

    > Button1.OnClick := nil;

    > end;

    >

    > 이와 같이하면

    > Event Disable 되더군요

    >

    > 그런데 다시 Enable하는 방법을 모르겠어서...

    >

    > 알려주시면 정말 감사하겠습니다..

    >

    > 그럼 좋은 하루 되세여....

    >

    >

    >

    >



    안녕하세요. ^^

    이벤트에..

    Button1.OnClick := Button1Click;

    이런식으로 넣으심 됩니다.



    그럼.20000.