Recent

Author Topic: TFindDialog Options  (Read 2786 times)

acolburn

  • New Member
  • *
  • Posts: 14
TFindDialog Options
« on: March 30, 2016, 09:07:27 pm »
I'm a newbie, learning by making a Notepad clone. I'm trying to implement Edit/Find functionality. I can display a FindDialog and write code to search all a Memo's text, starting at position 0, finding the dialog's FindText string.

The dialog, however, offers checkboxes with search options, as well as a radiogroup to select forward or backward searching. I'd like to try writing that code, too, but can't find how the dialog stores selected options. I know there's an Options property, but what are the options called?

I checked the documentation at http://lazarus-ccr.sourceforge.net/docs/lcl/dialogs/tfinddialog.html but it doesn't say anything about the Options property, other than that it exists. Can you point me toward the info I'm looking for, or an example?

Thank you!
Al

p.s. Just for my edification, looking at the documentation, if TFindDialog is parent to TReplaceDialog, why would you want a virtual Replace method or OnReplace event in the parent? Shouldn't they be part of just the child?
« Last Edit: March 30, 2016, 10:46:03 pm by acolburn »

acolburn

  • New Member
  • *
  • Posts: 14
Re: TFindDialog Options
« Reply #1 on: April 01, 2016, 12:37:59 am »
Found it!:

  TFindOption = (frDown, frFindNext, frHideMatchCase, frHideWholeWord,
                 frHideUpDown, frMatchCase, frDisableMatchCase, frDisableUpDown,
                 frDisableWholeWord, frReplace, frReplaceAll, frWholeWord, frShowHelp,
                 frEntireScope, frHideEntireScope, frPromptOnReplace, frHidePromptOnReplace,
                 frButtonsAtBottom);
  TFindOptions = set of TFindOption;

 

TinyPortal © 2005-2018