Use Windows.pkg Use MessageQueueHelpers.pkg Use THDialog.pkg Object oFindDialog is a ModalPanel Set Size to 75 270 Set Label to "Find" Set piMinSize to 75 270 Set Location to 44 47 Set Border_Style To Border_Thick //Set Locate_Mode to POPUP_LOCATE -- locate mode isn't smart enough Property Boolean pbStartFind Property Boolean pbMarkAll Set peAnchors to anAll Set piMaxSize to 75 8000 Object oSearchFm is a cFindComboForm Set Size to 13 160 Set Location to 10 45 Set Label to "W&hat:" Set Label_Col_Offset to 2 Set Label_Justification_Mode to JMode_Right Set peAnchors To anTopLeftRight End_Object Object oWordMatchCb is a cFindCheckBox Set Size to 10 50 Set Location to 26 45 Set Label to "Match &whole word only" End_Object Object oMatchCaseCb is a cFindCheckBox Set Size to 10 50 Set Location to 37 45 Set Label to "Match &case" End_Object Object oRegExCb is a cFindCheckBox Set Size to 10 50 Set Location to 48 45 Set Label to "Regular &expression" End_Object Object oDocumentStartCb is a cFindCheckBox Set Size to 10 50 Set Location to 59 45 Set Label to "Start at first &line" End_Object Object oDirectionGrp is a RadioGroup Set Size to 45 65 Set Location to 24 140 Set Label to "Direction" Set peAnchors to anTopLeftRight Object oUpRadio is a Radio Set Size to 10 50 Set Location to 14 10 Set Label to "&Up" End_Object Object oDownRadio is a Radio Set Size to 10 50 Set Location to 26 10 Set Label to "&Down" End_Object End_Object Object oFindBtn is a Button Set Label to "&Find" Set Location to 10 215 Set peAnchors to anTopRight Set Default_State to True Procedure OnClick String sValue Get Value of oSearchFm to sValue // if the user types or changes the search string we should Send AddSearchString of oSearchFm sValue // store it in the array for next time. Set pbStartFind to True Send Close_Panel End_Procedure End_Object Object oMarkAllBtn is a Button Set Location to 26 215 Set peAnchors to anTopRight Set Label to "&Mark All" Procedure OnClick Set pbStartFind to True Set pbMarkAll to True Send Close_Panel End_Procedure End_Object Object oCancelBtn is a Button Set Label to "Cancel" Set Location to 42 215 Set peAnchors to anTopRight Procedure OnClick Send Close_Panel End_Procedure End_Object On_Key Key_Alt+Key_H Send Activate of oSearchFm On_Key Key_Alt+Key_W Send doToggle of oWordMatchCb On_Key Key_Alt+Key_C Send doToggle of oMatchCaseCb On_Key Key_Alt+Key_E Send doToggle of oRegExCb On_Key Key_Alt+Key_L Send doToggle of oDocumentStartCb //On_Key Key_Alt+Key_U Send Activate of oUpRadio //On_Key Key_Alt+Key_D Send Activate of oDownRadio On_Key Key_Alt+Key_F Send KeyAction of oFindBtn On_Key Key_Alt+Key_M Send KeyAction of oMarkAllBtn On_Key kCancel Send KeyAction of oCancelBtn Procedure SettingsToOptions tFindReplaceOptions ByRef Options Get Value of oSearchFm to Options.sSearchText Move "" To Options.sReplaceText Get Checked_State of oWordMatchCb to Options.bWordMatch Get Checked_State of oMatchCaseCb to Options.bMatchCase Get Checked_State of oRegExCb to Options.bRegExp Get Checked_State of oDocumentStartCb to Options.bDocumentStart Get Current_Radio of oDirectionGrp to Options.eFindOptions Get pbMarkAll to Options.bMarkAll End_Procedure Procedure RequestDetails tFindReplaceOptions ByRef Options Boolean bStartFind Set pbStartFind to False set pbMarkAll to False Set SearchValue of oSearchFm to Options.sSearchText Set Checked_State of oWordMatchCb to Options.bWordMatch Set Checked_State of oMatchCaseCb to Options.bMatchCase Set Checked_State of oRegExCb to Options.bRegExp Set Checked_State of oDocumentStartCb to Options.bDocumentStart Set Current_Radio of oDirectionGrp to Options.eFindOptions Send Popup Send SettingsToOptions (&Options) Get pbStartFind to bStartFind If (bStartFind) Begin Move True to Options.bStartFind End End_Procedure #IFDEF TH_TRANSLATION Procedure Translate Set Label to gILanguage[852] Set Label of oSearchFm to gILanguage[853] Set Label of oWordMatchCb to gILanguage[854] Set Label of oMatchCaseCb to gILanguage[855] Set Label of oRegExCb to gILanguage[856] Set Label of oDirectionGrp to gILanguage[857] Set Label of (oUpRadio(oDirectionGrp(Self))) to gILanguage[858] Set Label of (oDownRadio(oDirectionGrp(Self))) to gILanguage[859] Set Label of oFindBtn to gILanguage[860] Set Label of oMarkAllBtn to gILanguage[861] Set Label of oCancelBtn to gILanguage[862] End_Procedure #ENDIF Procedure Activating Forward Send Activating #IFDEF TH_TRANSLATION Send Translate #ENDIF End_Procedure End_Object