Topic: Image replace by script
Hello all MVD fans and experts,
I need help with displaying a picture based on user input by script. Basically I want to display a picture depending on what the user inputs on
an edit field, and using script to accomplish the task. I'm thinking maybe, using case statements or if - then- else chains in the script, sort of
like:
procedure Form1_edit1_OnChange (Sender: TObject);
begin
if Form1.edit1.Text = 'PHARMACY' then Form1.Picture1.Picture := ('\img\pharmacy.png') else if
Form1.edit1.Text = 'REPAIR SHOP' then Form1.Picture1.Picture := (\img\repairshp.png');
end;
.....
....
Don't know how to write this code, just put that as an example. Your help is greatly appreciated. Thanks!!