• Login
Community
  • Login

Change the Tab caption from code

Scheduled Pinned Locked Moved Notepad++ & Plugin Development
2 Posts 1 Posters 3.3k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J
    Jeff Kelly
    last edited by Nov 11, 2015, 2:01 AM

    HI
    I am working with the .Net plugin template in C# and am having trouble trying to change the tab caption (file name) from code.
    We have our source code stored in a database. The plugin gets the selected code into a new page in NPP and I need to set the file name
    so we can see the primary key string that IDs that selection of code instead of the default “new 1”.

    I am hoping for an example of code that does not require user manual intervention.

    Thanks in advance
    Jeff.

    1 Reply Last reply Reply Quote 0
    • J
      Jeff Kelly
      last edited by Nov 11, 2015, 6:42 PM

      I have realised how I can do this.
      In my plugin in C# I create a new file with the file name I need to link to the primary keys of the dDB data.
      Then use
      Win32.SendMessage(PluginBase.nppData._nppHandle, NppMsg.NPPM_DOOPEN, 0, path);
      to open the file with the tab caption set.

      Thanks
      Jeff

      1 Reply Last reply Reply Quote 0
      1 out of 2
      • First post
        1/2
        Last post
      The Community of users of the Notepad++ text editor.
      Powered by NodeBB | Contributors