How to force Npp update file status?

  • Nobody/Anonymous

    I need to change icon on tab from read-only to normal and backward.
    I've found this solution:
    ShowWindow(nppData._nppHandle, SW_MINIMIZE);
    ShowWindow(nppData._nppHandle, SW_RESTORE);
    But it makes Npp blink.

    How can i do this in a better way?

    • Snaky

      Snaky - 2006-07-28

      I have the same question.

    • Snaky

      Snaky - 2006-07-31

      Hummm, I wrote a little plugin which does the following:

      1) When you attempt to edit read-only file message appears and you can change status of a file to non-read-only or keep it the same (in current version of Npp there is no such a feature and when i open read-only file for editing Npp says just don't insert any characters)
      2) Allows to change read-only status by pressing hot keys.

      So when status of a file has changed from Npp, Npp
      doesn't redraw tab icon and allow to modify this file even if it's now read-only. That's why i asked how to force Npp to update file status.
      What do you think about it?

    • Don HO

      Don HO - 2006-07-30

      You don't need to change it normaly since the tab icon updates on the status of document.