When I try to create a IScreenLabelChartObject from a Strategy this object appears only in the workspace tree but not on the screen.
When plotting a ScreenLabel manually by selecting from drawings - everything is ok.
Also it's impossible to open the "Edit Label" stage from context menu for this object in workspace tree. It's simply doesn't reacts on a command.
It's doesn't get a new text when I set it by .setText() method.
I've already tried almost all methods it has (.move(), setxDistance(), setyDistance(), .setMenuEnabled() etc.).
Here is some code:
public void onStart(IContext context) throws JFException {
IChart chart= context.getChart(Instrument.EURUSD);
IScreenLabelChartObject screenLabelChartObject;
screenLabelChartObject = chart.getChartObjectFactory().createScreenLabel("12345");
screenLabelChartObject.setMenuEnabled(true);
screenLabelChartObject.setVisibleInWorkspaceTree(true);
screenLabelChartObject.setText("text12345");
screenLabelChartObject.setColor(Color.white);
screenLabelChartObject.setMenuEnabled(true);
chart.add(screenLabelChartObject);
context.stop();
}