How to update GoRulerCursor value?

hi,

i have problem with GoRulerCusor , cause of even if i press scrollbar up/down cursor not tracking object position correctly.
public void UpdateGoRulerCursor(RectangleF rect) { GoRuler topRuler = this._goView.TopBar as GoRuler; IEnumerable ienum = topRuler.GetCursorEnumerable(); IEnumerator itr = ienum.GetEnumerator(); if (itr.MoveNext()) { GoRulerCursor cursor = itr.Current as GoRulerCursor; cursor.Value = rect.Location.X ; } GoRuler leftRuler = this._goView.LeftBar as GoRuler; ienum = leftRuler.GetCursorEnumerable(); itr = ienum.GetEnumerator(); if (itr.MoveNext()) { GoRulerCursor cursor = itr.Current as GoRulerCursor; cursor.Value = rect.Top; } }
protected void goView_DocumentChanged(Object sender, GoChangedEventArgs evt) { if (evt.Hint == GoDocument.ChangedTopLeft) { } else if (evt.Hint == GoDocument.ChangedSize) { } else if (evt.Hint == GoDocument.ChangedObject) { switch (evt.SubHint) { case GoObject.ChangedBounds: { UpdateGoRulerCursor(evt.NewRect);
break;
}
}
}
Thanks,
Suwit A.

Are you having a problem just when you scroll?

Please add a company email address to your profile.

Hi,
Yes, I have a problem when scrolling up/down/Left/Right the currsor not works properly with currently node's position. So please post me some sample to solve this.
Thanks,
Suwit
suwit@sun-system.com

OK, you want to track the view property event with hints for DocPosition and DocScaleā€¦

I think Jake means the GoView.PropertyChanged event.

Could you please post me some sample ?
Thanks,
Suwit

private void goView1_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
{
if (e.PropertyName == "DocPosition" || e.PropertyName == "DocScale")
{
// .... update ruler ....
}
}
Thank Jake,
The sample too short not enought information to done on this. Because
My boss, he just wants to know how it's work?
We have plan to upgrade to 2.6 or 3.0 in very near future.
If i could not complete on this issue, may be the plan to upgrade might be NOT proceed.
Suwit A.

You add this to your view class. It gets called when the DocPosition changes (e.g. on a scroll) and also when the DocScale changes.

See examples of this override in Demo1, Flowcharter, OrgCharter and ProtoApp.