Page 1 of 1

RectangleTool editable textbox

Posted: Mon Mar 17, 2008 6:19 pm
by 13045128
if an editable rectangletool is dragged arround the screen with the mouse and a key is pressed the text box that is used for editing the text in the rectangletool is displayed on the screen as a seperate object from the rectangletool.


public void AddAnnotation()

{

Steema.TeeChart.Tools.RectangleTool annotation = new Steema.TeeChart.Tools.RectangleTool();

annotation.KeyDown += new KeyEventHandler(annotation_KeyDown);

annotation.AllowEdit = true;
annotation.Text = "F2 to begin and end edit";
annotation.AutoSize = true;
annotation.AllowResize = true;
annotation.Click += new MouseEventHandler(annotation_Click);

this.uxChart.Tools.Add(annotation);
AdjustRectanglesPosition(uxChart, annotation, false);

}



void annotation_KeyDown(object sender, KeyEventArgs e)

{

//if enter key is pressed then exit annotation editing

if ((e.KeyCode == Keys.Enter || e.KeyCode == Keys.F2) && currentAnnotationTool != null)
currentAnnotationTool.EndEdit();
}



void annotation_Click(object sender, MouseEventArgs e)
{
annotationSelected = true;
currentAnnotationTool = (Steema.TeeChart.Tools.RectangleTool)sender;
}

Posted: Mon Mar 17, 2008 6:44 pm
by narcis
Hi history,

Thanks for reporting. I've been able to reproduce the problem here and added it (TF02012909) to our defect list to be fixed for future releases.