Tips and Frequently Asked Questions
Using custom inplace editors
Using custom inplace editors is possible with the Parameter controls but require some preparing of the inplace editor to be used correct. The custom inplace editor is invoked with the style ‘CUSTOM’, ie:
Parameter control events
When the custom inplace editor is about to be edited, the event OnParamCustomEdit is triggered with parameters:
For TParamLabel:
TParamCustomEditEvent = procedure(Sender: TObject; href, value, props: string; EditRect: TRect) of object;
TParamCustomEditEvent = procedure(Sender: TObject; idx: Integer; href, value, props: string; EditRect: TRect) of object;
TParamCustomEditEvent = procedure(Sender: TObject; Node: TTreeNode; href, value, props: string; EditRect: TRect) of object;
From this event, following code can be used to show the custom inplace edit control:
mycustomcontrol.Parent := Sender; mycustomcontrol.left := EditRect.Left; mycustomcontrol.Top := EditRect.Top; mycustomcontrol.Text := value; mycustomcontrol.Param := href; mycustomcontrol.OnUpdate := (Sender as TParamlabel).ControlUpdate; mycustomcontrol.Visible := true; mycustomcontrol.SetFocus;
procedure ControlUpdate(Sender: TObject; Param,Text:string);
Preparing the inplace edit control
Create a descendent component of the inplace edit control with following properties and events:
TParamUpdateEvent = procedure(Sender: TObject; Param, Text: string) of object; TMyCustomControl = class(TMyControl) private FParam: string; FOnUpdate: TParamUpdateEvent; procedure WMActivate(var Message: TWMActivate); message WM_ACTIVATE; protected procedure DoExit; override; procedure CreateParams(var Params: TCreateParams); override; public property Param: string read FParam write FParam; property OnUpdate: TParamUpdateEvent read FOnUpdate write FOnUpdate; end;
{ TMyCustomControl } procedure TMyCustomControl.CreateParams(var Params: TCreateParams); begin inherited; with Params do Style := Style AND NOT WS_CHILD OR WS_POPUP; end; procedure TMyCustomControl.DoExit; begin inherited; if Assigned(OnUpdate) then OnUpdate(Self,Param,Text); end; procedure TMyCustomControl.WMActivate(var Message: TWMActivate); begin inherited; if Message.Active = 0 then Hide; end;
Pricing
Single Developer License
Small Team License
Site License
TMS VCL UI Pack
€ 375
€
150
yearly renewal
license for 1 developer
MOST POPULAR
BEST VALUE
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.
Free Trial
Note that the TMS VCL UI Pack replaces the TMS Component Pack. Both products can't be installed simultaneously. Therefore TMS Component Pack must first be uninstalled before installing the TMS VCL UI Pack