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:


TMS VCL UI Pack

check_circle
TInspectorBar
is part of
TMS VCL UI Pack
info
Windows UI Essentials

Pricing

Single Developer License Small Team License Site License
 

TMS VCL UI Pack


€ 375

150 yearly renewal
license for 1 developer


Includes
check  Full source code
check  Access to the TMS Support Center
check  Free updates and new releases
check  All TMS VCL products
MOST POPULAR

TMS VCL Subscription


€ 895

450 yearly renewal
license for 1 developer


Includes
check  Full source code
check  Access to the TMS Support Center
check  Free updates and new releases
check  TMS VCL UI Pack
check  All TMS VCL products
more_horiz  Discover more
BEST VALUE

TMS ALL-ACCESS


€ 1,795

575 yearly renewal
license for 1 developer


Includes
check  Full source code
check  Access to the TMS Support Center
check  Free updates and new releases
check  TMS VCL UI Pack
check  All TMS VCL products
check  All TMS products
more_horiz  Discover more
All prices excl. VAT. Renewal price is subject to change and only valid up to 30 days after license has expired. After renewal period a discount price is offered to renew the license.

TMS ALL-ACCESS

key
Get unlimited access to all TMS products
local_offer
One money and time saving bundle

Free Trial

Start a free TMS VCL UI Pack evaluation today!
RAD Studio


What our customers say

Thank you Mr. Fierens for your time and assistance. Just want to say your VCL Pack is fabulous.

- Mark Mihevc

Thank you for this superb tool collection!

- Henning Swiboda

Thanks for the effort to create the VCL grid goodies ! These chunks of outcome-oriented teaching-material are very useful. It's unbelievable how powerful the grid is when one knows how to unveil it's countless options...

- Feichtenschlager Thomas

I don''t know how I could have created and managed so many projects without the AdvStringGrid! And although there is already so much functionality in it I''m using my own derived version with automatic column widths, enhanced export to Excel (including text colors, backround colors, comments, merged cells and more), the possibility to fill in static data at design time and more. This often allows me to build a new tool in hours instead of days! Support is also great! Thanks.

- Raß Jacqueline

Keep up the great work...Every new release of TMS Component Pack is like Xmas. Top quality components! :-)

- Aidan Thomson via email

TMS WEB Core

language
Create modern web apps in Delphi & VSC
build_circle
Use Object Pascal code to build JavaScript apps