DEL Key and List BOX
DEL Key and List BOX
Hi !
Does anyone knows if it is possible to prevent the user from pressing the keyboard's DEL key above a LisBox component ?
Indeed this key removes the selected serie of the Chart.
I wish the user could not delete any serie from the Chart.
So, I must catch the DEL key pressed EVENT but such an event doesn't exist...
If I could catch such an event, I could warn the user the pressing the del key will make the program to hang up.
Thanks for your help
Does anyone knows if it is possible to prevent the user from pressing the keyboard's DEL key above a LisBox component ?
Indeed this key removes the selected serie of the Chart.
I wish the user could not delete any serie from the Chart.
So, I must catch the DEL key pressed EVENT but such an event doesn't exist...
If I could catch such an event, I could warn the user the pressing the del key will make the program to hang up.
Thanks for your help
Hi,
TeeListBox does not have a KeyDown event associated with it. The following boolean properties will be added for the next maintenance relesaes :
AskDelete
AllowDeleteSeries
AllowAddSeries
But it could be simulated using the following code, when run with a form with a small command button _underneath_ a TeeChart or TeListBox object :
TeeListBox does not have a KeyDown event associated with it. The following boolean properties will be added for the next maintenance relesaes :
AskDelete
AllowDeleteSeries
AllowAddSeries
But it could be simulated using the following code, when run with a form with a small command button _underneath_ a TeeChart or TeListBox object :
Code: Select all
Private Sub Command1_KeyDown(KeyCode As Integer, Shift As Integer)
MsgBox KeyCode
End Sub
Private Sub Form_Load()
With TChart1
.AddSeries scArea
.Series(0).FillSampleValues (10)
End With
With TeeListBox1
.Chart = TChart1
.ShowIcon = False
End With
End Sub
Private Sub TeeListBox1_GotFocus()
Command1.SetFocus
End Sub
Pep Jorge
http://support.steema.com
http://support.steema.com
what about the properties planned to add ?
Hi !
I can't find the properties you promised to me in the 7.0.0.4 release :
AskDelete
AllowDeleteSeries
AllowAddSeries
for the ITeeListBox component.
Where are they ?
thanks for your reply.
I can't find the properties you promised to me in the 7.0.0.4 release :
AskDelete
AllowDeleteSeries
AllowAddSeries
for the ITeeListBox component.
Where are they ?
thanks for your reply.
Hi,
you're correct. I'm sorry, I'll add them for the next v7.0.0.5 release.
you're correct. I'm sorry, I'll add them for the next v7.0.0.5 release.
Pep Jorge
http://support.steema.com
http://support.steema.com
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Jenn,
Have you tried doing this?
Works fine for me here using Insert and Delete keys for adding and removing series.
Have you tried doing this?
Code: Select all
With TeeListBox1
.Chart = TChart1
.AskDelete = True
.AllowDeleteSeries = True
.AllowAddSeries = True
.ItemHeight = 20
End With
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 |
Hello Josep,
I am using VC++, TeeChart Pro V7.0.1.2.
and I don't see how to modify the AskDelete, AllowDeleteSeries, and AllowAddSeries in the teelistbox.h file.
Is there something else I need to do when I update my TeeChart files to get the appropriate header files? I think I've done everything I need to do, but maybe there's somthing I'm missing. I can modify these settings using the dialog editor, but I don't seee how to change the options during run-time, at least not in VC++.
Thank you.
Jennifer Britt
I am using VC++, TeeChart Pro V7.0.1.2.
and I don't see how to modify the AskDelete, AllowDeleteSeries, and AllowAddSeries in the teelistbox.h file.
Is there something else I need to do when I update my TeeChart files to get the appropriate header files? I think I've done everything I need to do, but maybe there's somthing I'm missing. I can modify these settings using the dialog editor, but I don't seee how to change the options during run-time, at least not in VC++.
Thank you.
Jennifer Britt
Hi Jennifer,
using the latest v7.012 posted on our web site you should be able to do it using the following code :
using the latest v7.012 posted on our web site you should be able to do it using the following code :
Code: Select all
m_listbox.SetChartLink(m_chart.GetChartLink());
m_listbox.SetAskDelete(true);
m_listbox.SetAllowDeleteSeries(true);
m_listbox.SetAllowAddSeries(true);
m_listbox.SetItemHeight(30);
Pep Jorge
http://support.steema.com
http://support.steema.com
Hello Josep,
Thank you for your reply.
The problem I experienced, though, was that my header files were not updated when I updated my TeeChart7.ocx file. I thought that the header files in my Program Files\Steema Software directory would have been updated at the same time, but they were not.
I got around this problem by doing the following.
Thank you!
Jennifer Britt
Thank you for your reply.
The problem I experienced, though, was that my header files were not updated when I updated my TeeChart7.ocx file. I thought that the header files in my Program Files\Steema Software directory would have been updated at the same time, but they were not.
I got around this problem by doing the following.
- Create a new temporary project
Add a TeeListBox component to the project. This generates new header files.
Copy over the newly genearted files over to my working project.
Thank you!
Jennifer Britt
Hi Jennifer,
yes, you're correct, we forgot to update the header files with the new maintenance release. The steps you've done are correct ones.
Just in case you have any problems with this, here you can see how to regenerate then :
http://www.teechart.net/support/viewtop ... c&start=15.
yes, you're correct, we forgot to update the header files with the new maintenance release. The steps you've done are correct ones.
Just in case you have any problems with this, here you can see how to regenerate then :
http://www.teechart.net/support/viewtop ... c&start=15.
Pep Jorge
http://support.steema.com
http://support.steema.com