![]() |
![]() |
![]() |
|||||
![]() |
![]() |
![]() |
![]() |
![]() |
|||
| Welcome
to Tech Support Forum home to more then 136,000 problems solved. Issues
have included: Spyware, Malware, Virus Issues, Windows, Microsoft,
Linux, Networking, Security, Hardware, and Gaming Getting your
problem solved is as easy as: 1. Registering for a free account 2. Asking your question 3. Receiving an answer Registered members: * See fewer ads. * And much more..
|
| Want to know how to post a question? click here | Having problems with spyware and pop-ups? First Steps |
|
|||||||
| Programming A discussion forum for programs and programming used in tech-related businesses. |
![]() |
|
|
Thread Tools |
|
|
#1 (permalink) |
|
Design Team Member
Join Date: Jul 2007
Location: Northampton, UK
Posts: 932
OS: Win Vista Home Premium & Ubuntu Hardy(8.04)
|
Delphi(&Pascal) problem with TStrings.delete();?
Hey,
I'm writing a context menu editor, and i have a problem with using the comboBox.Items.Delete(index); function: Code:
//for each of the items see if it's an extension or '*'
for forCount := 1 to cmbExtensions.Items.Count-1
do
begin
//if the begginning of the name is not '.' then delete
firstChar := cmbExtensions.Items[forCount];
firstChar := midStr(firstChar, 1, 1);
//showmessage(firstChar);
if (firstChar <> '.')
then
begin
//showmessage('not right');
//break;
//showmessage(firstChar);
//showmessage(cmbExtensions.Items[forcount]);
//showmessage(intToStr(forcount));
cmbExtensions.Items.Delete(forcount);
//showmessage(cmbExtensions.Items[forcount]);
end;
end;//for each of the items
cmbExtensions.items is every registry key in HKEY_CLASSES_ROOT, and what i'm trying to do is filter them down into only the .extensions and * but all my attemps have failed... I understand that this being delphi 7 it is quite outdated but if anyone has knowledge of it and can help with the problem i'd be very greatful... Cheers, Jamey |
|
|
|
![]() |
| Thread Tools | |
|
|