alank2 5 Posted March 4 This is for C++ Builder, but I would think there is a Delphi way to do it that would translate, so I'm asking how you would clear it in Delphi and/or cppb. It says it is "Property Customheaders:UnicodeString", but I can't set it using: nhc->CustomHeaders=""; I am setting it using: nhc->CustomHeaders[name]=value; But, if I want to clear out any custom headers and start again, how do I do that? Share this post Link to post
Lajos Juhász 316 Posted March 4 In Delphi it would be: nhc.CustHeaders.Clear; 1 Share this post Link to post
alank2 5 Posted March 4 Unfortunately there is no Clear() method. When I try to see what the methods are and type c, this is all it shows: Share this post Link to post
Remy Lebeau 1544 Posted March 4 (edited) The CustomHeaders property is an indexed property. It is used only to read/write individual headers by name. You are seeing the methods of a single UnicodeString instance. There is no option to clear the whole list using the CustomHeaders property. However, you can use the CustHeaders property instead (not to be confused with the CustomHeaaders property!). It gives you access to the whole list, and it has a Clear() method: nhc->CustHeaders->Clear(); // NOT nhc->CustomHeaders->Clear(), // which does not exist.... Edited March 4 by Remy Lebeau 1 Share this post Link to post