Community
    • Login

    Is it possible to configure the status bar panels

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    16 Posts 6 Posters 3.6k 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.
    • ThosRTannerT
      ThosRTanner @Eko palypse
      last edited by

      @Eko-palypse said:

      Maybe you wanna provide more details what exactly should be achieved.
      The field values can be retrieved by various other calls to either notepad++ or scintilla object.

      There is a plugin which writes some text to the status bar. Given the chances of my modifying that plugin are low to zero, I was wondering if i could right something to read what was meant to be displayed there and redisplay it across several bits, but that doenst seem to be possible

      Meta ChuhM Alan KilbornA 2 Replies Last reply Reply Quote 0
      • Meta ChuhM
        Meta Chuh moderator @ThosRTanner
        last edited by Meta Chuh

        @ThosRTanner

        [put plugin name here] was ment literarily.

        please provide us with the exact name of the plugin, more details about it, and a screenshot of it if possible.
        this way other users that use and know the same plugin can respond if they have a solution or a workaround.

        if you instead ask for help about “some” plugin that displays “some” text, you will most likely get equally verbalized answers like: "some" times there is "some" possibility to solve your problem if you do "some" stuff 😉

        1 Reply Last reply Reply Quote 4
        • Alan KilbornA
          Alan Kilborn @ThosRTanner
          last edited by Alan Kilborn

          @ThosRTanner

          Seconding Meta Chuh’s input. All that plus how about adding 2 screenshots, one with N++ superwide showing a nice display of what you like the plugin showing on the status bar, and then one with it with N++ at your desired (narrower) working width.

          HELP US HELP YOU

          1 Reply Last reply Reply Quote 2
          • ThosRTannerT
            ThosRTanner
            last edited by

            The plugin is this one: https://sourceforge.net/projects/notepad-linter/

            Here is a screenshot of my normal statusbar - with no space left on it for anything at all: https://gyazo.com/cd5b12876069d6694296b5431714f98e

            and this is what I get if I widen it up a lot: https://gyazo.com/8af0517a4f49c061f724d82815cf2b41

            The little blue line you can see at the right of the 1st one or about 2/3 across the 2nd one is the 80 column mark.

            Notice also the large amount of unused space on the status bar.

            1 Reply Last reply Reply Quote 2
            • PeterJonesP
              PeterJones
              last edited by PeterJones

              For future reference, you can embed It would have been nice if you’d embedded the images, so that we wouldn’t have to go clicking on random links to see your image. Syntax =

              ![](https://i.gyazo.com/cd5b12876069d6694296b5431714f98e.png)
              
              ![](https://i.gyazo.com/8af0517a4f49c061f724d82815cf2b41.png)
              

              Shows =

              (more formatting hints in the links in the FYI at the end)

              -----

              Back to your actual question:

              So you want to be able to read what’s in the section on the left of the status bar where you would normally see the file type (aka programming language name), even when the screen isn’t wide enough? Which in your example was “- Missing JSDoc @ returns declarion. (jsdoc/require-returns)”?

              That’s a good question. I don’t have a full answer yet: so far, I haven’t been able to.

              Details:

              I know that in PythonScript, you can use the notepad.setStatusBar(STATUSBARSECTION.DOCTYPE, '...text...') to change the value of that section of the status bar. But as of PythonScript 1.3.0.0, there isn’t an equivalent notepad.getStatusBar(STATUSBARSECTION.DOCTYPE) (I know, because I was just looking for such a thing a few days ago). You can read what’s normally there (the language description) using notepad.getLanguageDesc(notepad.getCurrentLang()).

              The other scripting plugins (see links below) probably have similar interfaces. But maybe one of them has an equivalent .getStatusBar(SECTION) notation. If so, you could use that to extract the value, and pop it to a msgbox or similar, depending on the

              Hmm, maybe it’s available as one of the Notepad++ messages… I’ll go do some more searching, and post a follow-on, if I can find something more.

              • Scripting Plugins
                • PythonScript
                  • PythonScript HOME
                  • PythonScript DOWNLOAD
                  • HELP = Plugins > Python Script > Context-Help
                  • Getting Started with Python
                • LuaScript
                  • LuaScript HOME
                  • LuaScript DOWNLOAD
                • jN: JavaScript for Notepad++
                  • jN WIKI
                  • jN DOWNLOAD
                • NppExec

              -----
              FYI:

              This forum is formatted using Markdown, with a help link buried on the little grey ? in the COMPOSE window/pane when writing your post. For more about how to use Markdown in this forum, please see @Scott-Sumner’s post in the “how to markdown code on this forum” topic, and my updates near the end. It is very important that you use these formatting tips – using single backtick marks around small snippets, and using code-quoting for pasting multiple lines from your example data files – because otherwise, the forum will change normal quotes ("") to curly “smart” quotes (“”), will change hyphens to dashes, will sometimes hide asterisks (or if your text is c:\folder\*.txt, it will show up as c:\folder*.txt, missing the backslash). If you want to clearly communicate your text data to us, you need to properly format it.

              1 Reply Last reply Reply Quote 2
              • PeterJonesP
                PeterJones
                last edited by

                I searched through the current available messages, and some of the NPP code, and couldn’t find any indication that you can get that text, rather than just setting it. So now I’m less confident that one of the other scripting plugins has access when PythonScript does not. ☹

                You might consider putting in a request at notepad-linter for the option of directing their messages to a msgbox instead of to the statusbar , as an alternative for such situations when the status bar is not sufficient.

                1 Reply Last reply Reply Quote 3
                • pnedevP
                  pnedev
                  last edited by

                  @ThosRTanner ,

                  There is one possible way to get the info (that needs to be verified but will work I guess).
                  However you’ll need a way to use the Win32 API for this.

                  Having the Npp handle you can use this Win32 API

                  ::EnumChildWindows(nppData._nppHandle, enumWindowsCB, 0);

                  and in the enumWindowsCB(HWND hwnd, LPARAM) callback function use

                  ::GetClassName(hwnd, winClassName, _countof(winClassName));

                  to get the Npp child’s window class type.

                  When the winClassName is equal to STATUSCLASSNAME you will have the status bar window handle hwnd.

                  Then you can directly send SB_GETPARTS, SB_GETTEXTLENGTH and SB_GETTEXT messages to the handle to retrieve the info you need.
                  The status bar part you’ll need to read in your case is STATUSBAR_DOC_TYPE.

                  1 Reply Last reply Reply Quote 3
                  • Eko palypseE
                    Eko palypse
                    last edited by

                    See here for more details when using PythonScript

                    1 Reply Last reply Reply Quote 2
                    • ThosRTannerT
                      ThosRTanner
                      last edited by

                      Well, after much fiddling around, I have a python script that detects whehter or not the status bar panel 0 starts with the magic sting, and if so collapses all the other items on the status bar, going to the win32APIs to do it. I’m not entirely convinced about the way I find the window handle, but it seems to work nicely.

                      1 Reply Last reply Reply Quote 0
                      • ThosRTannerT
                        ThosRTanner
                        last edited by

                        Well, it won’t let me edit or delete my previous post, so here’s another attempt.

                        Well, after much fiddling around, I have a python script that detects whether or not the status bar panel 0 starts with the string with which the linter plugin prefixes all messages, and if so collapses all the other items on the status bar, which means I don’t lose the text in them.

                        I’m not entirely convinced about the way I find the current window handle in the first place, but it seems to work nicely.

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