VCL

TInspectorBar

Outlook bar & property inspector component in one


Release

v1.8.5.0 (October 9, 2017)

Version history

Tips and Frequently Asked Questions

 How to use the TFormControlInspectorEditLink component


TFormControlInspectorEditLink allows to use any TWinControl based edit control that is placed on the form as inplace editor for the TInspectorBar.

To start using TFormControlInspectorEditLink, drop an instance on the form and also an instance of the edit control you want to use as inplace editor. Assign this control to TFormControlInspectorEditLink.Control. Then hook up the EditLink to TInspectorItem.EditLink and set TInspectorItem.PropertyType to ptCustom. Implement minimum the TFormControlInspectorEditLink.OnGetEditorValue / TFormControlInspectorEditLink.OnSetEditorValue events to get & set the value of the TInspectorItem as text from the control value.

Example:

To use a TAdvSearchEdit control as inplace editor for a TInspectorBar item, that performs filtering / lookup while typing in a dictionary, following code can be used applied on a default TInspectorBar:
procedure TForm1.FormCreate(Sender: TObject);
var
  sl: TStringList;
  i: integer;
begin
  AdvSearchEdit1.SearchButton.Visible := false;
  AdvSearchEdit1.CategoryButton.Visible := false;
  AdvSearchEdit1.DropDownHeader.Visible := false;

  // loading the dictionary file in the TAdvSearchEdit
  sl := TStringList.Create;
  try
    sl.LoadFromFile(''e:\tms\temp\dictionary.txt'');
    AdvSearchEdit1.LoadStrings(sl);
  finally
    sl.Free;
  end;

  // linking up the TAdvSearchEdit as inplace editor
  FormControlInspectorEditLink1.Control := AdvSearchEdit1;
  // inplace editor control will still hanbdle return key
  FormControlInspectorEditLink1.WantKeyReturn := true;

  InspectorBar1.Panels[0].ItemHeight := 26;
  InspectorBar1.Panels[0].Style := psProperties;

  for i := 0 to InspectorBar1.Panels[0].Items.Count - 1 do
  begin
    InspectorBar1.Panels[0].Items[i].EditLink := FormControlInspectorEditLink1;
    InspectorBar1.Panels[0].Items[i].PropertyType := ptCustom;
  end;
end;

procedure TForm1.FormControlInspectorEditLink1GetEditorValue(Sender: TObject;
  Item: TInspectorItem; var AValue: string);
begin
  AValue := AdvSearchEdit1.Text;
end;

procedure TForm1.FormControlInspectorEditLink1SetEditorValue(Sender: TObject;
  Item: TInspectorItem; AValue: string);
begin
  AdvSearchEdit1.Text := AValue;
end;
The result looks like:

Nancy Lescouhier (Nov 4, 2016)


VCL

for Delphi 7, 2007, 2009, 2010, XE, XE2, XE3, XE4, XE5, XE6, XE7, XE8, 10 Seattle, 10.1 Berlin, 10.2 Tokyo, C++Builder 2007, 2009, 2010, XE, XE2, XE3, XE4, XE5, XE6, XE7, XE8, 10 Seattle, 10.1 Berlin, 10.2 Tokyo (Prof/Enterprise/Architect)


View licensing FAQ
  • License for commercial use: Single developer license, Site license
  • Includes full source code
  • Free updates for a full version cycle (from v1.6 to v2.5) or maximum 2 years of free updates
  • Free priority support through email and forum

Single developer license


license for 1 developer € 95


order now
add to cart

Site license


unlimited developers in the company € 395


order now
add to cart


CreditCards and PayPal Accepted


This product is also available in the following bundle(s):

Bookmarks