Project JEDI - Issue Tracker
Mantis Bugtracker

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0004007 [JEDI VCL] 00 JVCL Components minor always 2006-12-03 03:41 2007-12-16 17:04
Reporter trafalga View Status public  
Assigned To obones
Priority normal Resolution fixed  
Status resolved   Product Version 3.20
Summary 0004007: TJvEdit & EmptyValue on showmodal form
Description On ShowModal Form :

1/If TJvEdit has focus and is empty, after a messagebox the emptyvalue is displayed instead of an empty text and this text is editable(TJvEdit is focused).
2/With the same condition, after the messagebox, if I use JvEdit.Text := '', it displays the emptyvalue and this text is editable (TJvEdit is focused).

I've changed 2 functions :

procedure TJvCustomEdit.FocusSet(PrevWnd: THandle);
begin
  inherited FocusSet(PrevWnd);
  FCaret.CreateCaret;
  DoEmptyValueEnter; // Add this line
end;

procedure TJvCustomEdit.SetText(const Value: TCaption);
begin
  if (csLoading in ComponentState) or not FIsLoaded then
  begin
    inherited Text := Value;
    Exit;
  end;
// Add "and (not(Focused))" in the line above
  FIsEmptyValue := (Value = '') and (EmptyValue <> '') and (not(Focused));
  if not FIsEmptyValue then
  begin
    Font.Color := FOldFontColor;
    inherited Text := Value;
  end
  else
  begin
    Font.Color := FEmptyFontColor;
    inherited Text := EmptyValue;
  end;
end;


Additional Information
Tags No tags attached.
Attached Files zip file icon test.zip [^] (3,236 bytes) 2007-10-12 05:22

- Relationships

-  Notes
(0010462)
trafalga (reporter)
2006-12-09 11:12

After some tests, it's not only for ShowModal Forms, it's for all forms and after a messagebox or a non-focusable control (like speedbutton).
(0013404)
obones (administrator)
2007-06-19 04:15

Please provide the zipped sources of a demo application showing this problem. Thanks.
(0013889)
obones (administrator)
2007-10-12 03:55

I'm not seing any problem with the current version and no demo program was given.
(0013913)
trafalga (reporter)
2007-10-12 05:20
edited on: 2007-10-12 05:23

sorry for the delay, I don't have notification for your 1st demand.

Test with latest JVCL (3.33 10/11/2007), only 1 problem exist :

Place a TJVEdit and TSpeedButton on a form.
Assign something on JVEdit1.EmptyValue ('Type text here') and for SpeedButton1 :

procedure TForm2.SpeedButton1Click(Sender: TObject);
begin
  JVEdit1.Text := '';
  JVEdit1.SetFocus;
end;

JvEdit1 is focused and 'Type text here' is visible and editable.

Works fine with TButton instead of TSpeedButton (no focus with TSpeedButton)

[EDIT] Test.zip uploaded

(0014074)
AHUser (developer)
2007-12-16 17:03

Fixed in SVN.

- Issue History
Date Modified Username Field Change
2006-12-03 03:41 trafalga New Issue
2006-12-09 11:12 trafalga Note Added: 0010462
2007-06-19 04:15 obones Note Added: 0013404
2007-06-19 04:15 obones Status new => feedback
2007-10-12 03:55 obones Status feedback => resolved
2007-10-12 03:55 obones Resolution open => unable to reproduce
2007-10-12 03:55 obones Assigned To => obones
2007-10-12 03:55 obones Note Added: 0013889
2007-10-12 05:20 trafalga Status resolved => feedback
2007-10-12 05:20 trafalga Resolution unable to reproduce => reopened
2007-10-12 05:20 trafalga Note Added: 0013913
2007-10-12 05:22 trafalga File Added: test.zip
2007-10-12 05:23 trafalga Note Edited: 0013913
2007-12-16 14:09 AHUser Note Added: 0014073
2007-12-16 16:58 AHUser Note Deleted: 0014073
2007-12-16 17:03 AHUser Status feedback => resolved
2007-12-16 17:03 AHUser Fixed in Version => Daily / SVN
2007-12-16 17:03 AHUser Resolution reopened => fixed
2007-12-16 17:03 AHUser Note Added: 0014074


Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker