No matter what I do, it doesn't seem to allow a e.g. a file being dropped onto it. Perhaps it is the wrong approach, but I want to drag and drop so that a user can drop files into the directory assigned to the FileListBox.
I would greatly appreciate it if someone could provide a function to search for Uppercase characters in string, except the first one. This is what I need to do, search for Caps in a string, and when found, insert a space in front of it, e.g:
TheFantasticCollection to The Fantastic Collection...
I need to obtain the current date and time in UTC (ISO 8601 extended) format to save it to a file like this:
"2013-02-02T11:25:17Z"
Would like the complete code (I do apologize for this, but my knowledge of this kind of programming is virtually zero [blush] ), e.g. a Button1OnClick event...
Thank you again.
The code seems to work (that is the app runs without any errors), but nothing appears in the editbox. I've uploaded the project and a sample file which contains the data the application looks for. This is a very simple project, just to test the search and display. As the...
I'll pre-define in the application which terms are relevant. All I'm giving the user is a label with an editbox. The reason being that not all terms might be present in the original file, so I would like to do a search for a term, e.g. "integer halttime", and if present display it's values in...
Thanks!
However, I think I didn't explain myself very well. The original file that is being opened, has a number of entries:
Now my application needs to search for e.g. integer displayinterval and display it's associated values in an EditBox. Same for the next search item. The values are...
The application should load the contents of a file into an invisible memo, and display the text between brackets in an EditBox so that a user can change it and save the file.
The file itself contains a number of lines, but the ones I'm interested in have the following format:
"integer...
It took awhile to think it out, but I managed it in the end. I basically assigned the last action to a string and then the Undo button deleted the matching string
ListBox_Files.items.Delete(ListBox_Files.Items.IndexOf(lastoperation));
where lastoperation is OpenDialog.Filename which executes...
I have 2 listboxes: one which contains filenames and the other folder locations. A button is used to add a filename via opendialog to the listbox, while clicking on a listbox containing folders adds the folder.
The selections work in pairs, e.g. Folder A goes with File A, Folder B with File...
This is how it finally ended, taylor.
function StringListContainsRuntime(StrList : TStringList) : Boolean;
begin
Result := (Pos('\Runtime\', StrList.Text) > 0);
End;
procedure TForm1.Button1Click(Sender: TObject);
var
StrList : TStringList;
begin
StrList := TStringList.Create...
I can't believe that it is that simple! It works perfectly
function StringListContainsRuntime(StrList : TStringList) : Boolean;
begin
Result := AnsiContainsText(StrList.Text, 'runtime');
if result=true then showmessage('Yes');
end;
procedure TForm1.Button1Click(Sender: TObject);
var
StrList ...
Ok, I think I have figured out why the above doesn't work (removed the var declaration of haystack and not assigning a value to Haystack inside the function). Will work it out some more over the weekend. Thanks for pointing me out in the right direction.
I apologize for being "dim", but I have never used AnsiContainsText before. So I've Googled for it and I'm trying it out as I go along. According to an example (on Delphi Basics):
http://www.delphibasics.co.uk/RTL.asp?Name=AnsiContainsText
function AnsiContainsText ( const Haystack, Needle ...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.