// Calculate the text bounds
Bounds textBounds = itemRenderer.getTextBounds();
if (textBounds != null) {
textInput = new TextInput();
Insets padding = (Insets)textInput.getStyles().get("padding");
// Calculate the bounds of what we're editing
Bounds editBounds = new Bounds(itemBounds.x + textBounds.x - (padding.left + 1),
itemBounds.y, itemBounds.width - textBounds.x + (padding.left + 1),
itemBounds.height);