Hi,
I want to create some tcharts in a Visual Basic form dynamically based on iparameter passed on. I mean to create 1, 3, or whatever number of charts in a single form at runtime.
Could someone please tell me if it is possible? If yes, could you please send me some code example?
Thanks in advance!
dynamically create number of Tcharts in a vb form?
-
- Site Admin
- Posts: 1349
- Joined: Thu Jan 01, 1970 12:00 am
- Location: Riudellots de la Selva, Catalonia
- Contact:
Hi --
Try:
Try:
Code: Select all
Private Sub Form_Load()
With TChart1
For i = 0 To 10
.AddSeries scLine
.Series(i).FillSampleValues 10
Next i
End With
End Sub
Thank you!
Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/
Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/
-
- Site Admin
- Posts: 1349
- Joined: Thu Jan 01, 1970 12:00 am
- Location: Riudellots de la Selva, Catalonia
- Contact:
Hi ...
The technique is exactly the same as the one used for adding any kind of control to a vb form at runtime; it is well documented and should be easy to find with a Google search.Thanks for your response. But it is not what I wanted. In your code, the series of TChart1 are added dynamically not TChart. I want add multiple TCharts dynamically. Any idea?
Thank you!
Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/
Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/