How do I make the label show on the right side of the image on the iconic node? I see the label.position property but I cant get it to show up correctly.
The node’s LayoutChildren determines the position of the label.
Some of the node classes have a LabelSpot to determine where the label goes. GoIconicNode doesn’t have that feature.
try this:
[Serializable]
public class GoIconicNodeRL : GoIconicNode {
public override void LayoutChildren(GoObject childchanged) {
base.LayoutChildren(childchanged);
if (this.Initializing) return;
GoObject icon = this.Icon;
if (icon == null) return;
GoText label = this.Label;
if (label != null) {
label.SetSpotLocation(SpotOpposite(GoObject.MiddleRight), icon, GoObject.MiddleRight, this.LabelOffset);
}
}
}
If the label is Editable = true, you probably also want to set the Label.Alignment = GoObject.MiddleLeft;
oops. LabelOffset is initialized to new SizeF(-99999, -99999). so, either set LabelOffset or change the call to something like
label.SetSpotLocation(SpotOpposite(GoObject.MiddleRight), icon, GoObject.MiddleRight, 10, 0);