• Login
Community
  • Login

::EnableMenuItem "do noting" on fileclosed??

Scheduled Pinned Locked Moved Notepad++ & Plugin Development
3 Posts 2 Posters 314 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.
  • M
    MarioRosi
    last edited by MarioRosi Dec 19, 2023, 8:15 AM Dec 19, 2023, 7:59 AM

    Hello,

    i have an strange effect.

    In my plugin is set on/off the menu items by filet ype. Only the actions for the relevant file type are activated.

    This ‘bufferIsActivated’-function is trigered on “NPPN_BUFFERACTIVATED” and work fine.
    But only after closing a file do the EnableMenuItem function apparently nothing, more exatly all menu items as new draw and enabled, like an redraw/recreate.

    It is possible, that notepad redraw his menues on file open and file close?
    Because, after i change the ‘bufferIsActivated’-function to “do only any thing by after ‘change the file type’”, it the sam effect, when open a new file with the sam file type as the currently file, all menu items are redraw.

    Is this a knowing effect? What can id do, which message can i catch?

    regards Mario

    C 1 Reply Last reply Dec 19, 2023, 5:56 PM Reply Quote 0
    • C
      Coises @MarioRosi
      last edited by Dec 19, 2023, 5:56 PM

      @MarioRosi

      Try adding:

      DrawMenuBar(nppData._nppHandle);
      

      after you enable or disable menu items.

      M 1 Reply Last reply Dec 23, 2023, 5:32 PM Reply Quote 2
      • M
        MarioRosi @Coises
        last edited by Dec 23, 2023, 5:32 PM

        @Coises
        DrawMenuBar has no effect.

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