jeudi 26 mars 2015

OnClick multiple conditions


procedure TForm1.Panel3Click(Sender: TObject);

begin

if item.caption='1' then
begin
form2.WebBrowser1.Navigate('link1');
form2.Caption:='1';
form2.Show;
end;
if item.caption='2' then
begin
form2.WebBrowser1.Navigate('link2');
form2.Caption:='2';
form2.Show;
end;
end.


what im trying to do is on Onclick event check item's caption and then browse a specefic link, this doesnt work and i tried the switch method which doesnt work too(sorry for my bad english), any suggestions on how can i make it work ?


Aucun commentaire:

Enregistrer un commentaire