View Issue Details

IDProjectCategoryView StatusLast Update
0004007JEDI VCL00 JVCL Componentspublic2007-12-16 17:04
ReportertrafalgaAssigned Toobones 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version3.20 
Target VersionFixed in Version3.34 
Summary0004007: TJvEdit & EmptyValue on showmodal form
DescriptionOn 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;


TagsNo tags attached.

Activities

trafalga

2006-12-09 11:12

reporter   ~0010462

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).

obones

2007-06-19 04:15

administrator   ~0013404

Please provide the zipped sources of a demo application showing this problem. Thanks.

obones

2007-10-12 03:55

administrator   ~0013889

I'm not seing any problem with the current version and no demo program was given.

trafalga

2007-10-12 05:20

reporter   ~0013913

Last edited: 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

2007-10-12 05:22

 

test.zip (3,236 bytes)

AHUser

2007-12-16 17:03

developer   ~0014074

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 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