How to align GoText in RecordItem


#1

How to alignment Icon & text position to left side like Listview
in GoGroup item


#2

You can just set their positions to be where you want them.
More generally, if you think the sizes of either the GoImage or the GoText object might change, or if those objects might be replaced, you’ll want to override GoGroup.LayoutChildren to do what you want.
You can look at the RecordItem example class in the Demo1 sample’s RecordNode file, for how to do this. That class was meant to be used in a GoMultiTextNode, but if you remove the code dealing with GoMultiTextNode, you might find that GoGroup subclass to be what you want.


#3
Walter, i overrided and reallocated new position as code below, but the Recorditem still alignment at center not thing change ( i modified form RecordNode class ), please advise. public override void LayoutChildren(GoObject childchanged) { if (this.Initializing) return; base.LayoutChildren (childchanged); GoListGroup lg = this.ListGroup; float left = lg.Left + lg.TopLeftMargin.Width; float width = lg.Width - lg.TopLeftMargin.Width - lg.BottomRightMargin.Width; for (int i = 2; i < this.ItemCount; i++) { GoObject item = GetItem(i); RecordItem itm = item as RecordItem;

if (itm!=null)
{
itm.Position = new PointF(lg.Location.X,itm.Location.Y);
}
}


#4

I’m sorry, but I don’t understand what you want to do.
Perhaps you don’t need to override LayoutChildren. Did you set the GoListGroup.Alignment property?