View Issue Details

IDProjectCategoryView StatusLast Update
0005987JEDI VCL00 JVCL Componentspublic2013-01-15 15:41
ReporterRHoekAssigned To 
Status acknowledgedResolutionopen 
Product VersionDaily / GIT 
Target VersionFixed in Version 
Summary0005987: Fire TJvCalcEdit.OnChange event after popup has been 'confirmed'
DescriptionWhen using TJvCalcEdit (or any other numeric combo edit), the OnChange event is not fired when the user 'commits' the calculated value.

I know of the 'EnablePopupChange' property

But that does NOT work because:
1) It's fired for every change made, while the popup is down
  (I only want the result value when the user presses the '=' of Enter)
2) When the user presses 'Escape' the last value, the use the typed (ex 1+2+3)
  will become the value for the edit (in this example 3), while it should
  keep the old value.

What I need is to:
- OR fire the OnChange event, when the use presses the '='/Enter after the
  user has completed calculating the result.
- OR make the event 'OnPopupValueAccepted' published for TJvCalcEdit

But from a generic point of view the OnChange event is the best - central/universal point - where the sullution should go to!
TagsNo tags attached.


2012-09-20 12:37


JVCL BUG - TJvCalcEdit (82,611 bytes)


2012-09-20 13:20

reporter   ~0020198

I've been digging into this and found, that because of the calculation the 'Text' value of the edit is set BEFORE 'TJvCustomComboEdit.AcceptValue' has been called.

Therefor the 'OnChange' event will not be fired, where the value has been accepted :(

'FOnPopupValueAccepted' will be fired no matter the what...

There for there should be some way to call 'OnChange' when the value has been actually modified, after the combo edit popup has closed...
- I'll dig into this en bit more


2012-09-20 13:38

reporter   ~0020199

Hmmm, as far as I can see, I would suggest to add modify the 'TJvCustomNumEdit.AcceptValue' or 'procedure TJvCustomComboEdit.AcceptValue'

Option 1) is impacting less components
Option 2) is a a general level, but impacts more components

1) TJvCustomNumEdit

procedure TJvCustomNumEdit.AcceptValue(const Value: Variant);
  inherited AcceptValue(Value);
  Self.Value := CheckValue(Value, False); //Polaris
  DoChange; //RH: added 2012-09-20

2) TJvCustomComboEdit

procedure TJvCustomComboEdit.AcceptValue(const Value: Variant);
  if Text <> VarToStr(Value) then
    Text := Value;
    Modified := True;
    //DoChange; (ahuser) "Text := Value" triggers Change;
  end else
    DoChange; //RH: added 2012-09-20

  if Assigned(FOnPopupValueAccepted) then

Issue History

Date Modified Username Field Change
2012-09-20 12:37 RHoek New Issue
2012-09-20 12:37 RHoek File Added: JVCL BUG - TJvCalcEdit
2012-09-20 13:20 RHoek Note Added: 0020198
2012-09-20 13:38 RHoek Note Added: 0020199
2013-01-15 15:41 obones Status new => acknowledged