hi
I am trying to make a simple feature where a user can add a rectangle tool to the chart , edit the text , later delete the annotation/rectangle tool
so i will have methods like addAnnotation , removAannotation and am planning to add editing using the AllowEdit = true and using Keydown event as follows
(below "annotation" can be rectangletool or annotation)
void annotation_KeyDown(object sender, KeyEventArgs e)
{
if (e.Key == Key.Enter)
currentAnnotationTool.EndEdit();
if(e.Key == Key.F2)
currentAnnotationTool.StartEdit();
}
is the below logic correct?
------------------------------
Have a flag to set which tool is selected - defalt = false
Add a annotation and set the flag to false
On click of the annotation , set the flag to true and set the currentannotation = selectedannotation
on keydown startedit on enter and endedit on F2(key can be any key)
in deleteAnnotation , remove the annotation from the chart tool collection
I am not able to hit the keydown event , I am able to hit the click event . do we have a sample to show how to use rectangletool for editing .
Also I saw that the rectangle shape "roundrectangle" is available , but the Shape property for rectangletool is readonly , so how can i have a round rectangle on my chart .
What is the use of EditorKey() eventhandler .
thanks,
Aniket
Silverlight : Rectangle / Annotation tool edit
-
- Newbie
- Posts: 46
- Joined: Wed Jan 28, 2009 12:00 am
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Silverlight : Rectangle / Annotation tool edit
Hi Aniket,
Yes, it seems fine to me.is the below logic correct?
I've checked that KeyDown event and RectangleTool editing doesn't work in TeeChart.Silverligh.dll. I've added these to the wish-list to be enchanced for future releases. In such circumstances, the only solution I can think of for editing a RectangleTool is using a textbox and assigning the text to the tool.I am not able to hit the keydown event , I am able to hit the click event . do we have a sample to show how to use rectangletool for editing .
Code below works fine for me here.Also I saw that the rectangle shape "roundrectangle" is available , but the Shape property for rectangletool is readonly , so how can i have a round rectangle on my chart .
Code: Select all
rectangle1.Shape.ShapeStyle = Steema.TeeChart.Silverlight.Drawing.TextShapeStyle.RoundRectangle;
It's is for checking which key has been pressed in an editor.What is the use of EditorKey() eventhandler.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
-
- Newbie
- Posts: 46
- Joined: Wed Jan 28, 2009 12:00 am
Re: Silverlight : Rectangle / Annotation tool edit
Hi Narcis,
Thanks for the roundrect comment , it does work , I must have set someting else .
On the annotation/rect editing .....
" I've checked that KeyDown event and RectangleTool editing doesn't work in TeeChart.Silverligh.dll. I've added these to the wish-list to be enchanced for future releases. In such circumstances, the only solution I can think of for editing a RectangleTool is using a textbox and assigning the text to the tool "
I checked in windows samples for the annotation/rect editing it works (canedit), shouldnt it be a bug for silverlight implementation ? I mean the logic i am trying to implement is because "CanEdit" is not working , even the Keydown event works in windows samples , so request teechart to take it as a bug . Am sure people will want to add and edit annotations/text set for thier charts , specially financial charts , in place editing should work the same way as in wondows samples .
which release will this fix/feature be a part of ? this is part of my (must have)requirements so need it quickly mate .
Thanks for the textbox suggestion , I did try the same , it works but , it doesnt provide the same utility/effect as the "in place" editing of recttool/annotation , which we have in windows .
thanks,
Aniket
Thanks for the roundrect comment , it does work , I must have set someting else .
On the annotation/rect editing .....
" I've checked that KeyDown event and RectangleTool editing doesn't work in TeeChart.Silverligh.dll. I've added these to the wish-list to be enchanced for future releases. In such circumstances, the only solution I can think of for editing a RectangleTool is using a textbox and assigning the text to the tool "
I checked in windows samples for the annotation/rect editing it works (canedit), shouldnt it be a bug for silverlight implementation ? I mean the logic i am trying to implement is because "CanEdit" is not working , even the Keydown event works in windows samples , so request teechart to take it as a bug . Am sure people will want to add and edit annotations/text set for thier charts , specially financial charts , in place editing should work the same way as in wondows samples .
which release will this fix/feature be a part of ? this is part of my (must have)requirements so need it quickly mate .
Thanks for the textbox suggestion , I did try the same , it works but , it doesnt provide the same utility/effect as the "in place" editing of recttool/annotation , which we have in windows .
thanks,
Aniket
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Silverlight : Rectangle / Annotation tool edit
Hi Aniket,
Thanks in advance.
Yes, we know that works with Windows Forms applications. However Silverlight is almost and independent framework so, even though TeeChart.Silverlight.dll reuses TeeChart.dll code, I'm not sure if this should be considered a bug or just needs to be reworked to be supported in TeeChart.Silverlight.dll.I checked in windows samples for the annotation/rect editing it works (canedit), shouldnt it be a bug for silverlight implementation ? I mean the logic i am trying to implement is because "CanEdit" is not working , even the Keydown event works in windows samples , so request teechart to take it as a bug . Am sure people will want to add and edit annotations/text set for thier charts , specially financial charts , in place editing should work the same way as in wondows samples .
I understand your position but I'm not able to provide an estimate date for now. I recommend you to be aware at this forum or subscribe to our RSS news feed for new release announcements and what's fixed and included on them.which release will this fix/feature be a part of ? this is part of my (must have)requirements so need it quickly mate .
Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |