Wrapping ParameterInfo

SyntaxEditor for Windows Forms Forum

Posted 12 years ago by Marianne
Version: 4.0.0261
Avatar
What is the easiest way to wrap a ParameterInfo tip so it doesn't end up partially offscreen? Is there a way to measure it before actually showing it?

------------------------------- Marianne

Comments (12)

Posted 12 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Marianne,

It should never show offscreen. When I type in really long summary descriptions and show parameter info here, it wraps to new lines. If you are seeing something different then perhaps you could email over a small sample that shows it.


Actipro Software Support

Posted 12 years ago by Kelly Leahy - Software Architect, Milliman
Avatar
Have you checked it with multi-monitor setups? I know I've had problems with another 3rd party control set for this, but I haven't noticed if it has problems in SyntaxEditor.

Kelly Leahy Software Architect Milliman, USA

Posted 12 years ago by Marianne
Avatar
I believe that's exactly what is happening. On multi-monitor setup the ParameterInfo can end up going all the way across the second monitor. Perhaps an option to get the ParameterInfo to wrap at the edge of the SE control instead of the screen might make it easier on those with dual monitors? Or else somehow detect the edge of the current monitor instead of the whole screen. Thanks.

------------------------------- Marianne

Posted 12 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Marianne,

Right now we're using this code to find the maximum screen width. Think it should change to Bounds instead?
Screen.FromPoint(location).WorkingArea.Width;


Actipro Software Support

Posted 12 years ago by Marianne
Avatar
I believe so. Although I'm not certain I think the WorkingArea may include the full bounds of both screens. But on rereading the descriptions of each it appears that you'd get the same result for Bounds itself. I don't have a dual monitor setup so I'm not able to test it directly and don't know how to be sure that the measurement is for the current screen only.

------------------------------- Marianne

Posted 12 years ago by Kelly Leahy - Software Architect, Milliman
Avatar
I can try to test when I get back to the house. I have a dual monitor setup, but my wife is in labor right now at the hospital and my second monitor is obviously NOT with me...

:)

Kelly Leahy Software Architect Milliman, USA

Posted 12 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Kelly, where are you priorities... playing with SyntaxEditor vs. wife in labor? Sheesh! :)

Marianne, we'll try and get a setup here soon to try this out. But it might also have to do with how the multi-monitor setup is done. In some cases, you can make each screen its own workarea in which everything is probably fine and you see the taskbar only on the primary screen.

In other cases, you can make the taskbar extend across the combined screens. In this scenario, Screen.WorkArea would probably return the combined area, thus leading to this behavior.

Is there a way for you to get more info on the screen setup that is causing this to occur? Thanks!


Actipro Software Support

Posted 12 years ago by Marianne
Avatar
I will do so and get back to you.

------------------------------- Marianne

Posted 12 years ago by Marianne
Avatar
It turns out for this customer it is not a dual screen issue. Rather, they tend to run the application in a normal (instead of maximized) state and the tooltip runs off the edge of the application onto the desktop and that's what they're looking to change. So I guess the only 'fix' would be to add an option to wrap the ParameterInfo at the edge of the control instead of the screen. Don't know if you'd be able or willing to add that in but for this customer I don't know of any other workaround. Thanks.

------------------------------- Marianne

Posted 12 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hmm... the issue with that is that a lot of parameter info tips can get very long, especially if you are using the .NET Languages Add-on since it pulls in .NET documentation. So making a thin popup (like if a SyntaxEditor was 1-200 pixels wide) would make a really tall popup that would end up extending over the height of the SyntaxEditor and being much harder to read. I'm not sure adding an option like that would be a good decision from a usability perspective based on the above.


Actipro Software Support

Posted 12 years ago by Marianne
Avatar
In cases where it's maximized then you'd still be in the same situation where it wraps into a very tall column. For those that place multiple apps on a single monitor I would think it would still be a worthwhile option but I definitely think it shouldn't be the default.

------------------------------- Marianne

Posted 12 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Marianne,

We've added a MaximumWidth property to the parameter and quick info objects for the next maintenance release. It will default to a "no maximum" setting.


Actipro Software Support

The latest build of this product (v2018.1 build 0341) was released 8 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.