Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ENTER key in TCppWebBrowser

Status
Not open for further replies.

arka

Programmer
Aug 6, 2001
1
JP

I am a newbie C++ Builder 5.0 user making a customized browser using the TCppWebBrowser component.

The browsing seems to work fine, but when a page has an HTML input field and I type into it, pressing the ENTER key seems to have no effect.

Does anyone know the reason for this, and what can be done about it? Any help would be highly appreciated.

Thanks in advance.
Arka Roy
 
click on your events tab for your edit box where you type in the address. goto your OnKeyPress event. in the coding for that, type in the following:

//-----------------------------------------------------------------

void __fastcall TForm1::Edit1KeyPress(TObject *Sender, char &Key)
{

if (Key == VK_RETURN) /*if the user presses the enter key...*/
{
WideString Url = String(Edit1->Text); /*make the address into a widestring*/
Form1->CppWebBrowser1->Navigate(BSTR(Url)); /*go there*/
}

}
//-----------------------------------------------------------------

Cyprus
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top