Marks position restoring @ various resolution
Marks position restoring @ various resolution
for functionality reason ,i cannot be able to use the save and reloading of tee file , so i am storing the the chart contents in separate file as template
and storing the marks positions too
marks are moved ...
example :
With TChart1.Series(i).marks.Positions.Position(j)
A1 = .ArrowFrom.X
b1 = .ArrowFrom.Y
c1= .ArrowTo.X
d1= .ArrowTo.Y
e1 = LeftTop.X
f1= LeftTop.Y
end with
these are created and stored @ resolution 1024 x1280
now when i change the resolution to 800* 680 or some other resolution
i load the saved file and need to draw the marks @specified location with respect to the new resolution .. how can i calilbrate the new values from old values with respect to resolution ....
Could you Pls respond asap
and storing the marks positions too
marks are moved ...
example :
With TChart1.Series(i).marks.Positions.Position(j)
A1 = .ArrowFrom.X
b1 = .ArrowFrom.Y
c1= .ArrowTo.X
d1= .ArrowTo.Y
e1 = LeftTop.X
f1= LeftTop.Y
end with
these are created and stored @ resolution 1024 x1280
now when i change the resolution to 800* 680 or some other resolution
i load the saved file and need to draw the marks @specified location with respect to the new resolution .. how can i calilbrate the new values from old values with respect to resolution ....
Could you Pls respond asap
this sample1.tee file is created @ screen height=1024(15360) and screen width=1280(19200)
when i load on the sample resolution , no issues , marks load good as saved location
but when i load with different resolution , i change my tchart height and width (in original functionality fit all objects
inside the screen) then my marks does not show in the saved location..
i would definitely see the marks at the saved position irrespective of resolution and irrespective of height and width of the chart
Enclosed : sample project along with samplee teefile
Could you pls respond asap
when i load on the sample resolution , no issues , marks load good as saved location
but when i load with different resolution , i change my tchart height and width (in original functionality fit all objects
inside the screen) then my marks does not show in the saved location..
i would definitely see the marks at the saved position irrespective of resolution and irrespective of height and width of the chart
Enclosed : sample project along with samplee teefile
Could you pls respond asap
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi daryl,
To achieve what you request you should make a relative positioning of the marks. It should be relative to any dynamic chart element: axes, series, ChartRect, etc.
Routine setting custom marks position may also need to be executed after loading .tee file.
To achieve what you request you should make a relative positioning of the marks. It should be relative to any dynamic chart element: axes, series, ChartRect, etc.
Routine setting custom marks position may also need to be executed after loading .tee file.
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 |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
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 |
There are many parameters to consider for example ,
axis.left.position,axis,bottom.position ,height ,width ..
i have been working on this for the couple of days , still not able to sort out .
if you can send me sample program for simple tchart1.height/tchart.width change . then it will be really helpful
issue : for example i saved the tee file @ tchart- height =5000 & width =5000, with marks moved to specifi positions a,b then
i open the same file with different height and width of the tchart then my points are not drawn @ the same positions ..
Your help is needed asap ..
axis.left.position,axis,bottom.position ,height ,width ..
i have been working on this for the couple of days , still not able to sort out .
if you can send me sample program for simple tchart1.height/tchart.width change . then it will be really helpful
issue : for example i saved the tee file @ tchart- height =5000 & width =5000, with marks moved to specifi positions a,b then
i open the same file with different height and width of the tchart then my points are not drawn @ the same positions ..
Your help is needed asap ..
Hi Daryl,
We've made some tests using the following code and we found no differences between importing @1280x1024 and importing @800x600 a teefile from a chart exported @1280x1024:
If this code doesn't work for you, try uncommenting line 'PositionMarks at method Command2_Click() to recalculate marks positions.
We've made some tests using the following code and we found no differences between importing @1280x1024 and importing @800x600 a teefile from a chart exported @1280x1024:
Code: Select all
Private Sub Command1_Click()
With CommonDialog1
.Filter = "TeeFile (.tee)|*.tee"
.ShowSave
If .FileName <> "" Then
TChart1.Export.asNative.SaveToFile .FileName, True
End If
End With
End Sub
Private Sub Command2_Click()
With CommonDialog1
.Filter = "Images (.tee)|*.tee"
.ShowOpen
If .FileName <> "" Then
TChart1.Import.LoadFromFile .FileName
'PositionMarks
End If
End With
End Sub
Private Sub Form_Load()
TeeCommander1.Chart = TChart1
TChart1.Aspect.View3D = False
TChart1.AddSeries scLine
TChart1.Series(0).FillSampleValues 10
TChart1.Series(0).Pen.Width = 2
TChart1.Series(0).Marks.Visible = True
TChart1.Series(0).Marks.Arrow.Visible = False
TChart1.Environment.InternalRepaint
PositionMarks
End Sub
Private Sub PositionMarks()
Dim i As Integer
With TChart1.Series(0)
For i = 0 To .Count - 1
.Marks.Positions.Position(i).Custom = True
.Marks.Positions.Position(i).LeftTop.Y = TChart1.Axis.Top.Position
Next i
End With
End Sub
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
chart height and width are dynamically ,
i have designed controls int he form to resize for the dynamic height and chart , when the chart height and width changes ... marks are not shown at ll ( this is for less height and width , if it is greater than original height and width,then all marks are visible )
i have designed controls int he form to resize for the dynamic height and chart , when the chart height and width changes ... marks are not shown at ll ( this is for less height and width , if it is greater than original height and width,then all marks are visible )
We've made a project where you can resize the chart (width and height), save as .tee file, load from .tee file.
We coudn't reproduce the problem here so, please, test this project and feel free to modify it to obtain a project where we can see the issue.
But we think you should do something similar than what we do.
The project I'm talking about is posted at news://www.steema.net/steema.public.attachments newsgroup
We coudn't reproduce the problem here so, please, test this project and feel free to modify it to obtain a project where we can see the issue.
But we think you should do something similar than what we do.
The project I'm talking about is posted at news://www.steema.net/steema.public.attachments newsgroup
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Look for a post with the following subject:
To Daryl: relative to http://www.teechart.net/support/viewtopic.php?t=6024
At date: Friday, 25th of May of 2007 at 11:01
It could also be a possibility that there was a synchronization problem between the newsgroup server and your news reader. If you still don't see the message mentioned please reset the newsgroups messages and load them again.
To Daryl: relative to http://www.teechart.net/support/viewtopic.php?t=6024
At date: Friday, 25th of May of 2007 at 11:01
It could also be a possibility that there was a synchronization problem between the newsgroup server and your news reader. If you still don't see the message mentioned please reset the newsgroups messages and load them again.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Hi Daryl,
As you can see in the method called PositionMarks, we use relative positions to calculate each mark position. I mean a mark is positioned in relation with left axis top/bottom and in relation with the coresponding x position point.
Note that when you move a mark with DragMarks Tool, you are positioning the mark using absolute positions.
Also, if you take a look at the "load from tee file button", you can see that we call the method PositionMarks to re-position them according to a possible new chart size.
As you can see in the method called PositionMarks, we use relative positions to calculate each mark position. I mean a mark is positioned in relation with left axis top/bottom and in relation with the coresponding x position point.
Note that when you move a mark with DragMarks Tool, you are positioning the mark using absolute positions.
Also, if you take a look at the "load from tee file button", you can see that we call the method PositionMarks to re-position them according to a possible new chart size.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |