Blog

All Blog Posts  |  Next Post  |  Previous Post

Switching between sources and more in the latest TTMSFNCMemo update

Bookmarks: 

Monday, April 24, 2023

With the latest iteration of the TTMSFNCMemo we have now added support for multiple sources and a file-extension/language map which is used to select the correct language based on the file-extension when loading a file in the memo. 

Sources

Sources enables the user to quickly switch between different lines, whilst keeping breakpoints, cursor position, …

TMS Software Delphi  Components

You can simply add sources to the Sources collection in the form designer or you can use the various add source function's to quickly load a file like the example down below: 

  if OpenDialog1.Execute then
  begin
    source := TMSFNCMemo1.AddSourceFromFile(OpenDialog1.Files[0]);
    tab := TMSFNCTabSet1.AddTab(source.Name);
    TMSFNCMemo1.ActiveSource := tab.Index;
  end;
 

File-extension / Language mapping

Every time you load a file, the memo will check the LanguageFileExtensionMap collection if it finds a registered extension, and then set the corresponding language. Just add the file extensions you want to the collection and you're good to go. Nothing else is needed. 

TMS Software Delphi  Components

Ready?

Want to try out the latest version of TTMSFNCMemo? Go ahead and download TMS FNC UI Pack. Drop the TTMSFNCMemo on the form and read through the online documentation, or open the demo which can be found in the installation directory



Bradley Velghe


Bookmarks: 

This blog post has not received any comments yet.



Add a new comment

You will receive a confirmation mail with a link to validate your comment, please use a valid email address.
All fields are required.



All Blog Posts  |  Next Post  |  Previous Post