3 is set to multiline with a Newline at start and end.
Kind of a hack, and certainly doesn't work if you plan to make the text editable. but easy.
If you want more granular control, you'll have to use a GoGroup with a GoText and a GoShape (new GoDrawing(GoFigure.Rectangle)), which can be rotated by setting the Angle property).
I tried as per you suggested in your earlier response by adding spaces at start & end of GoText objects.But i analysed that if GoText.Alignment = TopLeft, then only starting spaces reflected with GoText object on view, but spaces added at the end of GoText doesn't appear as:
But then i set GoText.Alignment = MiddleCenter, then spaces are reflected at the start as well as at the end of Gotext on view as:
But the requirement is to create GoText objects with TopLeft alignment only.
So how added spaces at the start as well as at the end of GoText.Text could be reflected with TopLeft alignment on view?
Try this. It adds RotatedText and a rotatable GoDrawing Figure to a GoTextNode, letting you set margins.
[code]
using System; using System.Collections.Generic; using System.Text; using System.Drawing; using System.Drawing.Drawing2D; using Northwoods.Go;
namespace App { class RotatedTextNode : GoTextNode {
// a simple class that has a RotatedText and rotatable GoDrawing Figure. // Allows setting of TopLeftMargin and BottomRightMargin to control the // border around the text.
// no ports are supported, so it's not really much of a "Node".
For me, RotetedText class works fine except only one issue. In my application, moving the stop point, the corresponding text should be moved accordingly, which works fine with Target Route: 92 RotatedText object.
But the issue is that its border is not refreshed on its movement. It keeps left some portion of its border on view.Please see attached image with circled portion: