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
0002589 [JEDI VCL] 00 JVCL Components minor always 2005-02-02 08:14 2005-02-04 01:16
Reporter CCR View Status public  
Assigned To obones
Priority normal Resolution fixed  
Status resolved   Product Version
Summary 0002589: Add in place activation and deactivation events to TJvRichEdit, like this...
Description You 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;
Additional Information
Tags No tags attached.
Attached Files

- Relationships

-  Notes
(0006374)
obones (administrator)
2005-02-04 01:16

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


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