AutoSize and GoText

We have a GoText object that displays text fine for 99% of our clients. I found a discussion here that says if trimming is on and the height is not enough, the text will not be drawn. Then I had the question, how can the height be okay for 99% and not okay for 1%. I finally found the setting to change the dpi (display properties->setting tab->advanced button->general tab->dpi) and was able to reproduce the problem on my pc.
It looks like the form is made larger, as well as the font, but not the GoText objects. I understand the form being scaled - since AutoSize is set to true - but I’m not sure why only the text inside the GoText is larger, but the size and location of the GoText objects is unchanged. I set the GoText height to 20 and the font size to 11. I have a code sample if needed.
Has anyone encountered this?

Do you need to set the Height of the GoText object? It’s best to let it get its size by having GoText.AutoResizes be true.

If we set AutoResizes to true, then we can’t limit the width of the text. It is displayed inside a GoGroup and GoNode. Actually, between two images. So, when the text is too large, we want to trim the extra characters.
Here’s my sample code. This is not what we do with our app, but was created to test when the strings get removed based on the size of the GoText boxes.
It is just setup to add the GoText during the load. The GoView dockstyle is set to fill and the form just needs to be wider than the gotext objects.
private void Form1_Load(object sender, System.EventArgs e)
int o = 0;
const int startHeight = 15;
for (int h = startHeight ; h < startHeight + 10 ; h++)
AddText(h, o);
o += h + 5;
private void AddText(float height, float offsetY)
GoText p = new GoText();
p.AutoResizes = false;
p.StringTrimming = StringTrimming.EllipsisCharacter;
p.Clipping = true;
p.Selectable = false;
p.Location = new PointF(10, 5 + offsetY);
p.Height = height;
p.Width = 100;
p.Bordered = true;
p.FontSize = 11;
p.Text = “Size = " + height.ToString() + " - yjgqp”;
this.Height = int.Parse((p.Top + p.Height + 34).ToString());

OK, but then can’t you limit the Width but not change the Height of the GoText?
Or, don’t limit the Width and instead move the images farther apart to leave room for the text.
I just rebooted my machine to use large fonts, and all the sample GoDiagram Win applications seem to work fine. Things do look different (larger text and more bold and more text wrapping), but that’s to be expected.
In particular, the InfoNode examples work well. They involve a bunch of text and image objects positioned relative to each other.

If I don’t set the height, I think it gets set to whatever the default value is.
We can’t move the images because we have “cards” designed that all need to be the same size. Can’t change the size because they would get way too big. The field in question is actually a name, so most of the time we have plenty of space. When the name is really long, we just show what fits and the rest is available as a tooltip.
I played with the appearance, font size and did not see any changes. Only when the dpi was changed did I notice anything. All of the windows items then appeared to change (bigger), but not the Go objects.
I guess there is no easy way to handle this given our requirements. Everything just has to get bigger and more spread out. I was just hoping there was something I was missing on the goview that would handle resizing everything based on the dpi setting.

If you don’t set the GoText.Height, but want to change the size of the text, just set the GoText.FontSize. Are you saying that you tried increasing the GoText.FontSize, but didn’t see any changes?
You can change the GoView.DocScale to proportionately increase the size of everything. That includes the text, although the actual font mapping is controlled by GDI+.

The font size is being set to 11 and I can see a difference if I change it to something else. I am setting the width to 100 (based on the design I received) and the Height to 20 - so the font size of 11 will fit.
We are using the DocScale to allow users to zoom in/out (similar to the mouse wheel) from a menu option. But, like you said, the text gets scaled with everything else, so changing the doc scale won’t help with this particular problem. If the Go objects to not change based on the dpi setting (like the text does), then I need to either document that it should be set to 100% only or update the position and size of every Go object when displaying it.
I guess I was just looking to see if anyone else had dealt with the dpi changing and how Go objects handled it.

If you don’t explicitly set the GoText.FontSize, you can just change the value of GoText.DefaultFontSize when your application starts up, say by 96.0f / Graphics.DpiX.
For those GoText objects where you do set FontSize, you can modify the FontSize accordingly.