Page 1 of 1

Vertical text

Posted: Tue Apr 07, 2020 1:39 am
by seoman
I want to write vertical text and if i use static text wordwrap and multiline seems to be doing the trick

But if I want to show strings coming from a Tag ie string(10) then I cannot get the string to be shown vertical.

If i dynamicly draw the text like this:

Code: Select all

formGraphics.DrawString(
						Globals.Tags.myText.Value,
						drawFont,
						currentBrush,
						new Rectangle(
						Globals.Tags.x1.Value,
						Globals.Tags.y1.Value,
						20,
						800));
the text will be drawn into the rectangle and the rectangle is about as wide as the font. So it will draw the text vertical

BUT BUT only when i run (F5) the program.
If i download it to the X2 Pro it will draw the text outside the box and therefore horizontal.

Were is this difference between a simulation and a real panel comming from.
and How do i draw strings vertical?

Re: Vertical text

Posted: Mon Jul 27, 2020 1:48 pm
by Russ C.
Hi Seoman,

So to clarify, the main the difference between the PC runtime and the panel runtime, is the panel runtime is limited to the 3.5 Compact Framework.

Attached is a 2.40 SP4 project, that demonstrates how you could display text from a tag vertically on a panel.
I tested on an X2 Pro 10, and it works as expected.
VerticalTextFromTag.zip
(32.32 KiB) Downloaded 359 times