View Issue Details

IDProjectCategoryView StatusLast Update
0002589JEDI VCL00 JVCL Componentspublic2005-02-04 01:16
ReporterCCRAssigned Toobones 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version 
Target VersionFixed in Version3.00 
Summary0002589: Add in place activation and deactivation events to TJvRichEdit, like this...
DescriptionYou could add OnInPlaceActivate and OnInPlaceDeactivate events, called like this:

procedure TJvCustomRichEdit.SetUIActive(Active: Boolean);
var
  Form: TCustomForm;
begin
  try
    Form := GetParentForm(Self);
    if Form <> nil then
      if Active then
      begin
        if (Form.ActiveOleControl <> nil) and
          (Form.ActiveOleControl <> Self) then
          Form.ActiveOleControl.Perform(CM_UIDEACTIVATE, 0, 0);
        Form.ActiveOleControl := Self;
        if AllowInPlace and CanFocus then
          SetFocus;
        if Assigned(FOnInPlaceActivate) then FOnInPlaceActivate(Self); //!!!CCR
      end
      else
      begin
        if Form.ActiveOleControl = Self then Form.ActiveOleControl := nil;
        if (Form.ActiveControl = Self) and AllowInPlace then
        begin
          Windows.SetFocus(Handle);
          SelectionChange;
        end;
        if Assigned(FOnInPlaceDeactivate) then FOnInPlaceDeactivate(Self); //!!!CCR
      end;
  except
    Application.HandleException(Self);
  end;
end;

The point of the events is that you may need to clear away UI elements other than the ones the VCL automatically does for you. And TOLEContainer has OnActivate and OnDeactivate, after all.

Furthermore, it would be useful to have a CloseActiveObject method with public visibility added to TJvCustomRichEdit, implemented as the following:

procedure TJvCustomRichEdit.CloseActiveObject;
begin
  if FRichEditOle <> nil then IRichEditOle(FRichEditOle).InPlaceDeactivate;
end;
TagsNo tags attached.

Activities

obones

2005-02-04 01:16

administrator   ~0006374

Thanks, this is now in CVS. Please use version 1.64

Issue History

Date Modified Username Field Change
2005-02-02 08:14 CCR New Issue
2005-02-04 01:16 obones Status new => resolved
2005-02-04 01:16 obones Fixed in Version => 3.00
2005-02-04 01:16 obones Resolution open => fixed
2005-02-04 01:16 obones Assigned To => obones
2005-02-04 01:16 obones Note Added: 0006374