Hello!
In the following code snippet, I want the ‘border’ to be always visible; i.e. if I keep moving the quip object to the right, ‘border’ is not visible after a few mouse moves. What I want is, the ‘border’ should always be at a fixed position, relative to the left margin in the visible region. How can I achieve this?
public partial class Form1 : Form
{
private GoView view;
private GoDocument model;
public Form1()
{
InitializeComponent();
InitGoObjects();
view.Dock = DockStyle.Fill;
Controls.Add(view);
}
private void InitGoObjects()
{
view = new GoView();
model = view.Document;
GoComment quip = new GoComment();
quip.Text = "42";
quip.Position = new PointF(50, 50);
model.Add(quip);
GoRectangle border = new GoRectangle();
border.Size = new SizeF(20, 100);
model.Add(border);
}
}
Thanks,
Pradip