| View previous topic :: View next topic |
| Author |
Message |
Kevin Grandmaster Cheater Supreme
Reputation: 0
Joined: 07 Mar 2007 Posts: 1139 Location: Spiderman-World
|
Posted: Wed Jun 20, 2007 10:53 am Post subject: Webbrowser ... |
|
|
Im trying to make a webbrowser in delphi to learn more.
I currently got back/foward buttons, adress bar, webbrowser.
when i enter the adress in the Tedit box it just loads. If someone could tell me how to make it kinda wait till i clicked a GO! button.
could someone tell me how to make it stop loading until i click a button, and how to attach the button and the editbox.
thanks in advance, kevin. |
|
| Back to top |
|
 |
Simsgy Grandmaster Cheater
Reputation: 0
Joined: 07 May 2007 Posts: 581 Location: My new avatar <3
|
Posted: Wed Jun 20, 2007 11:00 am Post subject: |
|
|
Make the Go button, and then double click on it, and write the following:
| Code: |
Procedure ...............................;
var
Address: String;
begin
Edit1.Text := Address;
WebBrowser1.Navigate(Address);
end;
|
Replace WebBrowser1 if it is not your WebBrowser's name.
Replace Edit1 if it is not your editbox's name.
And tell me if it works  _________________
|
|
| Back to top |
|
 |
HomerSexual Grandmaster Cheater Supreme
Reputation: 5
Joined: 03 Feb 2007 Posts: 1657
|
Posted: Wed Jun 20, 2007 11:07 am Post subject: |
|
|
you prolly have it set for when the tedit box changes
try it so its set for a button _________________
|
|
| Back to top |
|
 |
Simsgy Grandmaster Cheater
Reputation: 0
Joined: 07 May 2007 Posts: 581 Location: My new avatar <3
|
Posted: Wed Jun 20, 2007 11:08 am Post subject: |
|
|
| blankrider wrote: | you prolly have it set for when the tedit box changes
try it so its set for a button |
I already taught him.
Look one post over you  _________________
|
|
| Back to top |
|
 |
Kevin Grandmaster Cheater Supreme
Reputation: 0
Joined: 07 Mar 2007 Posts: 1139 Location: Spiderman-World
|
Posted: Wed Jun 20, 2007 11:11 am Post subject: |
|
|
| i did the OnClick now, i just double clicked before. my mistake. But adding a go button is a good idea too. i'll try it. |
|
| Back to top |
|
 |
HomerSexual Grandmaster Cheater Supreme
Reputation: 5
Joined: 03 Feb 2007 Posts: 1657
|
Posted: Wed Jun 20, 2007 11:12 am Post subject: |
|
|
i gave him ideas
you gave him code
:] _________________
|
|
| Back to top |
|
 |
Kevin Grandmaster Cheater Supreme
Reputation: 0
Joined: 07 Mar 2007 Posts: 1139 Location: Spiderman-World
|
Posted: Wed Jun 20, 2007 11:19 am Post subject: |
|
|
well, i used the code you gave me Simsgy. But it just deletes the text in the adress when i click the button. doesnt even load.
i was thinking if i could use a if statement... (yes, i made panels for a better look)
if Panel1.execute then edit1.text opens webbrowser
or something like that  im a bit newb still but at least i got the first part of the if statement right, i hope  |
|
| Back to top |
|
 |
assaf84 Expert Cheater
Reputation: 0
Joined: 03 Oct 2006 Posts: 238
|
Posted: Thu Jun 21, 2007 6:51 am Post subject: |
|
|
| Simsgy wrote: | Make the Go button, and then double click on it, and write the following:
| Code: |
Procedure ...............................;
var
Address: String;
begin
Edit1.Text := Address;
WebBrowser1.Navigate(Address);
end;
|
Replace WebBrowser1 if it is not your WebBrowser's name.
Replace Edit1 if it is not your editbox's name.
And tell me if it works  |
u can just:
WebBrowser1.Navigate(Edit1.Text);
and in the Stop button:
WebBrowser1.Stop;
That's kind of an easy thing... It's all encapsulated in the TWebBrowser.. |
|
| Back to top |
|
 |
Kevin Grandmaster Cheater Supreme
Reputation: 0
Joined: 07 Mar 2007 Posts: 1139 Location: Spiderman-World
|
Posted: Thu Jun 21, 2007 7:05 am Post subject: |
|
|
| assaf84, but what if i want to click a seperate button beside the adress bar (a editbox) to make it load the page? how do i do that? |
|
| Back to top |
|
 |
|