initial size for toolwindow couldn't make it work?
Answered
I have a TOP anchored toolwindow and trying to give an initial height? So far tried stretchHeight, resize, even tried using loadstate and setstate in toolwindowManager, but couldn't make it work. Any ideas how to do that?
Please sign in to leave a comment.
I think you need to post some code instead of error describe.
so the toolwindow class I use is below a simple toolwindow with implements createToolWindowContent method.
and in plugin.xml I give the anchor top. what I want to do is to limit the initial size of the toolwindow to a height I give. In order to do that I clean my build and reinstall plugin from scratch and by default the height is some value big which I couldnt find a way to override. The code below initially occupies a a big vertical space. Is it possible to limit that toolwindow height somehow?
I also tried with a blank implementation nothing at all just to limit the vertical height with the blank code below, you can see how big that blank toolwindow is.
with my current resolution I tested couple of times, and finally got a perfect result when I specify -150 value to stretchHeight. But should it be negative value like that?
I just debugged the intellij source code and found the solution. Just posting here just in case anyone might need that:
TOOL_WINDOW_HEIGHT is the size you want it to be.
It is not work for my idea version (2021.2).
Guess toolWindow size is overriding after calling my factory method.
So, I set the size in startUpActivity, after all toolWindows are initializated