I'm creating a pretty simple form, and I'm running into an issue with Controls/components shifting position (textboxes and checkboxes in particular) by a few pixels upon selection. It's by no means breaking my interface, but you can imagine it's a bit of an irritant. I have a feeling it's an issue with the custom node(s) I've created... though I can't determine where the problem would be.
I did something similar before without any trouble, but ever since I tried "modularizing" my code (created a custom node with label and texbox opposed to separately declaring each in the main) I've come across this (along with a few other subtle issues). Here is my custom node... in case this gives way to figuring out my problem.
public class NumberWithLabelNode extends CustomNode {
public var width: Number;
public var height: Number;
public var x: Number;
public var y: Number;
public var labelText: String = "Generic Label: ";
public var text: String = "0.0";
public var columns: Integer = 5;
public var error: Boolean = false;
public var errorText: String = " Invalid input.";
public override function create(): Node {
return HBox {
width: bind width
height: bind height
content: [
Text {
content: bind labelText
},
TextBox {
layoutInfo: LayoutInfo { hgrow: Priority.NEVER }
columns: bind columns
text: bind text with inverse
},
Text {
visible: bind error
fill: Color.RED
content: bind errorText;
}
]
}
}
}
If you see anything I've done incorrectly/doesn't follow standards, please let me know. To re-iterate, I want this custom node to behave exactly as if I created a label and textbox in an hbox.
I'm hoping somebody can at least guide me in the direction of where my issue could be without having to look at the rest of my source (may be a long shot... I'm hoping to not have to strip down code to post here).
Thanks in advance!