[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: WebView object - Event on Link click
[Thread Prev] | [Thread Next]
- Subject: Re: WebView object - Event on Link click
- From: Benoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx>
- Date: Wed, 9 Sep 2026 18:21:57 +0200
- To: user@xxxxxxxxxxxxxxxxxxxxxx
Le 09/09/2026 à 18:07, Olivier Cruilles a écrit :
Hello, Thank you for your answer, it helped me.So WebView1_Url() does not fire and never raise on my case (Gambas Dev last commit), but WebView1_MouseUp() dose the job:Public Sub WebViewDoc_MouseUp() Dim Champs1 As String[] Print "WebViewDoc.Url = " & WebViewDoc.Link If WebViewDoc.Link Like "doc:*" Then Champs1 = Scan(WebViewDoc.Link, "*:*") If Champs1.Count = 2 ThenAfficher_Message("Affichage du document: " & Champs1[1] & " ...", True)Lecture_Fichier_Doc(Champs1[1]) End If Endif End Olivier
To detect that the webview is redirected to a new url (either by clicking on a link or any other mean), I use the 'Start' event.
In the 'Start' event handler, I read the 'Link' property, and the 'Url' property if 'Link' is void. Then I can decide what to do with the new url.
Using STOP EVENT in that event handler aborts the request. Regards, -- Benoît Minisini.
| WebView object - Event on Link click | Olivier Cruilles <olivier.cruilles@xxxxxxxx> |
| Re: WebView object - Event on Link click | gbWilly <gbWilly@xxxxxxxxxxxxxx> |
| Re: WebView object - Event on Link click | Bruce Steers <bsteers4@xxxxxxxxx> |
| Re: WebView object - Event on Link click | Olivier Cruilles <olivier.cruilles@xxxxxxxx> |