Q&A

  • FindDialog의 사용법은?
지금 델파이 언어도 익히는 겸 간단한 메모장을 만들고 있습니다. 전에 비쥬얼 베이직을 만져본 경험이 있어서 쉽군요. 거의 비슷합니다.

하여간... 메모장을 만드는데... 메모장에 찾기버튼이 있잖아요. 그 기능을 구현하고 싶습니다. 그래서 컴포넌트 팔레트의 Dialogs탭에서 FindDialog를 눌러서 써먹으려구 하는데...... 근데....... 쓰는 방법을 잘 모르겠군요... 다른건 다 잘되는데 Dialog쪽에서 막힙니다ㅡㅡ^ FindDialog의 사용법좀 갈켜주세요.(기왕이면 FontDialog도 같이...)



델파이 책이 오려면 8~9일 남았어요ㅠㅠ



그럼... 둥; //<-한글모드에서 영타로 바꾸는거 잊어버리고 치면 end; 가 되죠...(자주 헷갈려서 저를 짜증나게 하는 부분중의 하나...ㅡㅡ;)

1  COMMENTS
  • Profile
    김일영 2001.09.23 00:05
    답변이 늦어서 미안합니다.

    일단 Help를 보시면 TFindDialog의 Option에 대하여 아래와 같이 설명이 나옵니다.

    아마 이것만 아시면 필요하신 내용을 알 수 있지 않을까 싶습니다.



    type

    TFindOption = (frDown, frFindNext, frHideMatchCase, frHideWholeWord, frHideUpDown, frMatchCase, frDisableMatchCase, frDisableUpDown, frDisableWholeWord, frReplace, frReplaceAll, frWholeWord, frShowHelp);

    TFindOptions = set of TFindOption;

    property Options: TFindOptions;



    frDisableMatchCase :

    Disables (grays) the Match Case check box. ('대/소문자 구분'체크박스)



    frDisableUpDown :

    Disables (grays) the Up and Down buttons,

    (찾을 방향 '위쪽' '아래쪽'이라 나온 박스)

    used to determine the direction of the search.



    frDisableWholeWord :

    Disables (grays) the Match Whole Word check box.

    ('단어 단위로'체크박스)



    frDown :

    Selects the Down button by default when the dialog opens.

    If the frDown flags is off, Up is selected when the dialog opens.

    (By default, frDown is on.)



    frFindNext :

    This flag is turned on when the user clicks the Find Next button and

    turned off when the dialog closes. ('다음 찾기'버튼)



    frHideMatchCase :

    Removes the Match Case check box from the dialog.



    frHideWholeWord :

    Removes the Match Whole Word check box from the dialog.



    frHideUpDown :

    Removes the Up and Down buttons from the dialog.



    frMatchCase :

    This flag is turned on (off) when the user selects (deselects)

    the Match Case check box.

    To select the check box by default when the dialog opens,

    set frMatchCase at design time.



    frReplace :

    Applies to TReplaceDialog only. (FindDialog에선 작동하지 않는 옵션이죠.)

    This flag is set by the system to indicate that

    the application should replace the current occurrence

    (and only the current occurrence) of the FindText string with

    the ReplaceText string.



    frReplaceAll :

    Applies to TReplaceDialog only. (역시 FindDialog에선 효과없는 옵션이죠.)

    This flag is set by the system to indicate that

    the application should replace all occurrences of

    the FindText string with the ReplaceText string.



    frShowHelp :

    Displays a Help button in the dialog.



    frWholeWord :

    This flag is turned on (off) when the user selects (deselects)

    the Match Whole Word check box.

    To select the check box by default when the dialog opens,

    set frWholeWord at design time.



    By default, all options except frDown are off.



    해석이나 설명을 해서 올리려고 했었는데 내용을 보니 워낙 단순해서 그냥...

    섣불리 제가 용어를 바꾸면 오히려 혼돈스러울 것 같고요...

    그냥 용어를 덧붙여 썼습니다.



    혹시 하는 노파심에 덧붙이자면

    간혹 FindDialog가 검색 기능을 갖고 있는 줄 아시는 분들이 계시는데,

    검색 기능 자체는 직접 구현하셔야 합니다.

    OnFind 이벤트에서 FindText 프로퍼티에 설정된 문자열에 대해서

    검색하도록 코딩하시면 될 것입니다.



    수고하십시오.