TFindDialog is broken
Original Reporter info from Mantis: Bart @flyingsheep
-
Reporter name: Bart Broersma
Original Reporter info from Mantis: Bart @flyingsheep
- Reporter name: Bart Broersma
Description:
TFindDialog does not behave as it should.
1.
If you set a search option (like frWholeWord), either in ObjectInspector or by code, this is not shown correctly in the FindDialog (by means of the Execute method).
2.
Setting the events for OnFind, OnShow and OnClose does not have any effect at all. These events are not called if you press "Find" in the dialog, open the dialog or close it.
3.
The find button should respond to pressing the Enter key, the Cancel button should respond to the Escape key. Neither of them do.
Steps to reproduce:
Place a TFindDialog on a Form.
Place a button on the form. In it's OnClick do FindDialog1.Execute.
Set some of it's Options.
Set the OnFind, OnShow and OnClose events.
Make the events show do a ShowMessage or something otherwise trivial.
Run the program.
Press the button that launches the FindDialog.
Type some text to search.
Press "Find"
Expected behaviour:
The OnShow of the FindDialog fires.
The FindDialog reflects the options that are set.
After Pressing "Find" the OnFind method fires.
After the dialog closes the OnClose event fires.
Observed behaviour:
The OnShow does not fire.
Options (Whole words, Case sensitive, Forward or Backward) are not displayed correctly.
The OnFind does not fire (the dialog simply disappears).
The OnClose does not fire.
Additional information:
I have not tested the TReplace dialog extensively but it seems to behave the same.
I have not tested this under Linux yet.
Test project (findreplacebug.zip) attached.
Mantis conversion info:
- Mantis ID: 8370
- OS: WinMe
- OS Build: MS
- Build: 10176
- Platform: i386
- Version: 0.9.20
- Fixed in version: 0.9.23 (SVN)
- Fixed in revision: 11490 (#4750d21b)
- Monitored by: » Vincent (Vincent Snijders)
- Target version: 1.0.0
- LazTarget: 1.0