Blog

All Blog Posts  |  Next Post  |  Previous Post

What's new in TMS FNC UI Pack 3.4

Bookmarks: 

Tuesday, May 18, 2021

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.

TTMSFNCPassLock

TTMSFNCPassLock 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.
TMS Software Delphi  Components

TTMSFNCControlPicker

The 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.

TMS Software Delphi  Components

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.

TMS Software Delphi  Components

First create a new extended button class:

type
  TButtonEx = class(TButton, ITMSFNCControlPickerBase)
  private
    FCount: Integer;
    function PickerGetContent: String;
  protected
    procedure Click; override;
  public
    constructor Create(AOwner: TComponent); override;
  end;
 
{ ButtonEx }

procedure TButtonEx.Click;
begin
  inherited;
  Inc(FCount);

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

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

function TButtonEx.PickerGetContent: String;
begin
  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);
begin
  b := TButtonEx.Create(Self);
  b.Parent := self;

  TMSFNCControlPicker.Control := b;
end;



Gjalt Vanhouwaert


Bookmarks: 

This blog post has received 2 comments.


1. Tuesday, May 18, 2021 at 5:14:51 PM

When will it show up in the subscription manager?

Farmer Christian


2. Tuesday, May 18, 2021 at 5:18:20 PM

Hi,

It should show up now, TMS FNC UI Pack has been released.

Pieter Scheldeman




Add a new comment:
Author:
Email:
  You will receive a confirmation mail with a link to validate your comment, so please use a valid email address.
 
Comment:
 
 

All fields are required.
 



All Blog Posts  |  Next Post  |  Previous Post