What’s new in TMS FNC UI Pack 3.4


There are a lot of great new features available in our FNC components and this blog will highlight the new additions to the TMS FNC UI Pack. If you want to check the improvements on TMS FNC Maps, click here.For the list of fixes and improvements, you can check the version history, but two new components were added to the product as well.TTMSFNCPassLockTTMSFNCPassLock is an updated version of the FMX passlock in the TMS FMX UI Pack.This component gives you the ability to add password protection to your application.
It's not only possible to further customize the buttons and pattern, but also the ability to not show the length of your password.
Next to that you have the similar workings of the numpad and pattern layout and the learn mode to set a new password.TTMSFNCControlPickerThe TTMSFNCControlPicker helps you to create a dropdown variant of your control.This can be done with the ITMSFNCControlPicker interface and is implemented by default in the TTMSFNCTreeView, TTMSFNCTableView, TTMSFNCListBox and TTMSFNCListEditor.It is possible to implement the interface in your own control, for more information regarding the necessary procedures and functions to implement, please check the documentation.Some additional events are available, to mimic the basic mechanics of the interface without implementing it and to make the control even more customizable.This is an example of the base implementation to retrieve the content that should be shown in the dropdown edit. It shows the number of times the button was clicked.First create a new extended button class:type
TButtonEx = class(TButton, ITMSFNCControlPickerBase)
FCount: Integer;
function PickerGetContent: String;
procedure Click; override;
constructor Create(AOwner: TComponent); override;

{ ButtonEx }

procedure TButtonEx.Click;

if Assigned(Parent) and (Parent is TTMSFNCCustomSelector) and Assigned(Parent.Owner) and (Parent.Owner is TTMSFNCControlPicker)then
//Update ControlPicker if assigned as control
(Parent.Owner as TTMSFNCControlPicker).UpdateDropDown;

constructor TButtonEx.Create(AOwner: TComponent);
FCount := 0;
Text := 'Click this';

function TButtonEx.PickerGetContent: String;
Result := IntToStr(FCount) + ' Clicks';
end;The only thing left to do is creating the button and assiging it to a TTMSFNCControlPicker:procedure TForm1.FormCreate(Sender: TObject);
b := TButtonEx.Create(Self);
b.Parent := self;

TMSFNCControlPicker.Control := b;

Comments are closed.