Community
    • Login

    Change the Tab caption from code

    Scheduled Pinned Locked Moved Notepad++ & Plugin Development
    2 Posts 1 Posters 3.6k Views 1 Watching
    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.
    • Jeff KellyJ Offline
      Jeff Kelly
      last edited by

      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
      • Jeff KellyJ Offline
        Jeff Kelly
        last edited by

        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

        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

        With your input, this post could be even better ๐Ÿ’—

        Register Login
        • First post
          Last post
        The Community of users of the Notepad++ text editor.
        Powered by NodeBB | Contributors