View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002505 | JEDI VCL | 00 JVCL Components | public | 2005-01-15 13:44 | 2005-08-10 08:13 |
Reporter | Simes | Assigned To | obones | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | 3.00 BETA 2 | ||||
Target Version | Fixed in Version | 3.10 | |||
Summary | 0002505: TJvFindReplace doesn't make un-found text available to OnNoFound handler | ||||
Description | When calling Replacing or Finding from the *Replace* dialog, the text that isn't found isn't made available. Run the code below. Enter a Find string, and press Find Next or Replace. The message box shows the correct text, but the label1 doesn't. | ||||
Additional Information | unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, JvComponent, JvFindReplace; type TForm1 = class(TForm) Memo1: TMemo; JvFindReplace1: TJvFindReplace; Button2: TButton; Button1: TButton; Label1: TLabel; procedure Button1Click(Sender: TObject); procedure Button2Click(Sender: TObject); procedure FormShow(Sender: TObject); procedure JvFindReplace1NotFound(Sender: TObject); private public end; var Form1: TForm1; implementation {$R *.dfm} procedure TForm1.FormShow(Sender: TObject); begin Button1.Caption := 'Reset'; Button2.Caption := 'Test'; Button1Click(self); end; procedure TForm1.Button1Click(Sender: TObject); begin Memo1.Clear; Memo1.Lines.Add('main main something'); Memo1.Lines.Add('main this main that maintain main'); Memo1.Lines.Add('another main'); Memo1.CaretPos := Point(0, 0); Memo1.SetFocus; end; procedure TForm1.Button2Click(Sender: TObject); begin JvFindReplace1.Options := [frDown]; JvFindReplace1.EditControl := Memo1; JvFindReplace1.FindText := ''; JvFindReplace1.Replace; end; procedure TForm1.JvFindReplace1NotFound(Sender: TObject); begin Label1.Caption := '"' + TJvFindReplace(sender).FindText + '" not found'; end; end. | ||||
Tags | No tags attached. | ||||
|
suggested change: procedure TJvEditorFindReplace.DoFailed(Sender: TObject); var FCaption: string; begin if not Assigned(FEditControl) then Error; SetFindText(TFindDialog(Sender).FindText); //<---- add this line if Assigned(FOnNotFound) then FOnNotFound(Self); ... |
|
See 2515 - it has a modified version of this component. |
Date Modified | Username | Field | Change |
---|---|---|---|
2005-01-15 13:44 | Simes | New Issue | |
2005-01-15 13:44 | Simes | Note Added: 0006146 | |
2005-01-16 13:04 | Simes | Note Added: 0006157 | |
2005-01-17 03:14 | obones | Relationship added | related to 0002515 |
2005-08-10 07:54 | obones | Status | new => confirmed |
2005-08-10 08:13 | obones | Status | confirmed => resolved |
2005-08-10 08:13 | obones | Resolution | open => fixed |
2005-08-10 08:13 | obones | Assigned To | => obones |