Re: [Gambas-user] A question about WebView

2016-10-17 Thread Gianluigi
Hi Jorge,

I hope you enjoyed.
Yes now in Genoa everything is OK.
I'll pretend to believe you've enjoyed my bad script, you are very kind.
Also I'm venturing for the first time with WebView to create a project for
the farm, unfortunately, I realize that I understand very little.
I thank you very much for the exhaustive answer, I find the trick brilliant
and points for me to new directions.
I wait to download your code from the Farm.
Have my best regards.

Gianluigi

2016-10-17 6:33 GMT+02:00 Jorge Carrión :

> Hi Gianluigi:
>
> Sorry for the delay but this has been a hard (or good!) weekend for me, no
> computers at all... .
> I hope the problems of the whilwind are fixed yet in your town.
> I've seen your code and it's a good javascript based solution but I'm
> afraid I'm not able to implement it in my proyect. This is the first time I
> deal with webview component and I prefer to do it whith Gambas.
>
> Essentialy the tricky solution I've found is keep the external urls (href
> tags) of the html text in a string[] and then  to replace all  with "blind
> inner links" ( Then the webview acts on that links showing the appropiate cursor undeline
> font, etc. but doesn't go anywhere if you click on it. Just show a balloon
> with de original url of the link.
> When you read de .html property of the control all the replacements are
> translated to the original Urls, so you have the html edited.
>
> I don't know if this is usefull for you, but is what I've done. I'll put it
> on gamba's farm soon, I think.
>
> Best Regards
>
> 2016-10-14 22:39 GMT+02:00 Gianluigi :
>
> > Lucky you Jorge,
> > if here in Genoa, today not there had been a whirlwind (no electricity
> and
> > discarge notebook :-( ) I (too) would have answered so:
> > '--
> > Public Sub Form_Open()
> >
> >   WebView1.HTML = MakeHtml()
> >
> > End
> >
> > Private Function MakeHtml() As String
> >
> >   Dim sHtml As String
> >
> >   sHtml = "" & "\n"
> >   sHtml &= "" & "\n"
> >   sHtml &= "" & "\n"
> >   sHtml &= "http://gambaswiki.org/wiki\;
> > onclick=\"myFunction(event)\">Documentation" & "\n"
> >   sHtml &= "" & "\n"
> >   sHtml &= "function myFunction(event) {" & "\n"
> >   sHtml &= "event.preventDefault();" & "\n"
> >   sHtml &= "document.getElementById(\"myAnchor\").innerHTML =
> > \"Canceled\";" & "\n"
> >   sHtml &= "}" & "\n"
> >   sHtml &= "" & "\n"
> >   sHtml &= "" & "\n"
> >   sHtml &= "" & "\n"
> >
> >   Return sHtml
> >
> > End
> >
> > Public Sub Form_Close()
> >
> >   Print WebView1.HTML
> >
> > End
> > '--
> > It is no good code, but I had come this way.
> > As I'm starting to study WebView I wanted to ask you, this is how it
> should
> > be implemented the script.
> > Otherwise?
> > Can you give me any suggestions?
> >
> > Regards
> > Gianluigi
> >
> > 2016-10-14 17:25 GMT+02:00 Jorge Carrión :
> >
> > > Well... I think that I've found a workaround only with gambas. (It's a
> > > little tricky but it works),
> > >
> > > Thank you for the answers.
> > >
> > > Best Regards
> > >
> > > 2016-10-14 15:03 GMT+02:00 Moviga Technologies :
> > >
> > > > There might be a way to do it with Gambas, but you can use
> javascript's
> > > > preventDefault()
> > > >
> > > > http://www.w3schools.com/jsref/event_preventdefault.asp
> > > >
> > > >
> > > > Den 14. okt. 2016 12:15, skrev Jorge Carrión:
> > > > > I'm trying to do a control like textEdit, but allowing with links
> and
> > > > > images, based on webBrowser example.
> > > > >
> > > > > All is done and works fine, but if I create a link ( > and
> > > I
> > > > > click on it the webview, naturally, follows the link and I loose
> all
> > > the
> > > > > changes on the page.
> > > > >
> > > > > I want prevent that behaviour in the way that if user clik on a
> link
> > > and
> > > > > the editable property is true, the webview doesn't follow the link.
> > > > >
> > > > > Hope this will be more clear.
> > > > >
> > > > > Best Regards
> > > > >
> > > > > 2016-10-14 11:39 GMT+02:00 Gianluigi :
> > > > >
> > > > >> Hello Jorge,
> > > > >> I do not understand the question, could you be more specific?
> > > > >> Thank you
> > > > >> Gianluigi
> > > > >>
> > > > >> 2016-10-13 18:29 GMT+02:00 Jorge Carrión :
> > > > >>
> > > > >>> Is there a way to stop the follow of links in webview when
> webview
> > is
> > > > in
> > > > >>> "edit mode" (editable=true)?
> > > > >>>
> > > > >>> Best Regards
> > > > >>> 
> > > > >>> --
> > > > >>> Check out the vibrant tech community on one of the world's most
> > > > >>> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> > > > >>> ___
> > > > >>> Gambas-user mailing list
> > > > >>> Gambas-user@lists.sourceforge.net
> > > > >>> 

Re: [Gambas-user] A question about WebView

2016-10-16 Thread Jorge Carrión
Hi Gianluigi:

Sorry for the delay but this has been a hard (or good!) weekend for me, no
computers at all... .
I hope the problems of the whilwind are fixed yet in your town.
I've seen your code and it's a good javascript based solution but I'm
afraid I'm not able to implement it in my proyect. This is the first time I
deal with webview component and I prefer to do it whith Gambas.

Essentialy the tricky solution I've found is keep the external urls (href
tags) of the html text in a string[] and then  to replace all  with "blind
inner links" (:

> Lucky you Jorge,
> if here in Genoa, today not there had been a whirlwind (no electricity and
> discarge notebook :-( ) I (too) would have answered so:
> '--
> Public Sub Form_Open()
>
>   WebView1.HTML = MakeHtml()
>
> End
>
> Private Function MakeHtml() As String
>
>   Dim sHtml As String
>
>   sHtml = "" & "\n"
>   sHtml &= "" & "\n"
>   sHtml &= "" & "\n"
>   sHtml &= "http://gambaswiki.org/wiki\;
> onclick=\"myFunction(event)\">Documentation" & "\n"
>   sHtml &= "" & "\n"
>   sHtml &= "function myFunction(event) {" & "\n"
>   sHtml &= "event.preventDefault();" & "\n"
>   sHtml &= "document.getElementById(\"myAnchor\").innerHTML =
> \"Canceled\";" & "\n"
>   sHtml &= "}" & "\n"
>   sHtml &= "" & "\n"
>   sHtml &= "" & "\n"
>   sHtml &= "" & "\n"
>
>   Return sHtml
>
> End
>
> Public Sub Form_Close()
>
>   Print WebView1.HTML
>
> End
> '--
> It is no good code, but I had come this way.
> As I'm starting to study WebView I wanted to ask you, this is how it should
> be implemented the script.
> Otherwise?
> Can you give me any suggestions?
>
> Regards
> Gianluigi
>
> 2016-10-14 17:25 GMT+02:00 Jorge Carrión :
>
> > Well... I think that I've found a workaround only with gambas. (It's a
> > little tricky but it works),
> >
> > Thank you for the answers.
> >
> > Best Regards
> >
> > 2016-10-14 15:03 GMT+02:00 Moviga Technologies :
> >
> > > There might be a way to do it with Gambas, but you can use javascript's
> > > preventDefault()
> > >
> > > http://www.w3schools.com/jsref/event_preventdefault.asp
> > >
> > >
> > > Den 14. okt. 2016 12:15, skrev Jorge Carrión:
> > > > I'm trying to do a control like textEdit, but allowing with links and
> > > > images, based on webBrowser example.
> > > >
> > > > All is done and works fine, but if I create a link ( and
> > I
> > > > click on it the webview, naturally, follows the link and I loose all
> > the
> > > > changes on the page.
> > > >
> > > > I want prevent that behaviour in the way that if user clik on a link
> > and
> > > > the editable property is true, the webview doesn't follow the link.
> > > >
> > > > Hope this will be more clear.
> > > >
> > > > Best Regards
> > > >
> > > > 2016-10-14 11:39 GMT+02:00 Gianluigi :
> > > >
> > > >> Hello Jorge,
> > > >> I do not understand the question, could you be more specific?
> > > >> Thank you
> > > >> Gianluigi
> > > >>
> > > >> 2016-10-13 18:29 GMT+02:00 Jorge Carrión :
> > > >>
> > > >>> Is there a way to stop the follow of links in webview when webview
> is
> > > in
> > > >>> "edit mode" (editable=true)?
> > > >>>
> > > >>> Best Regards
> > > >>> 
> > > >>> --
> > > >>> Check out the vibrant tech community on one of the world's most
> > > >>> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> > > >>> ___
> > > >>> Gambas-user mailing list
> > > >>> Gambas-user@lists.sourceforge.net
> > > >>> https://lists.sourceforge.net/lists/listinfo/gambas-user
> > > >>>
> > > >> 
> > > >> --
> > > >> Check out the vibrant tech community on one of the world's most
> > > >> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> > > >> ___
> > > >> Gambas-user mailing list
> > > >> Gambas-user@lists.sourceforge.net
> > > >> https://lists.sourceforge.net/lists/listinfo/gambas-user
> > > >>
> > > > 
> > > --
> > > > Check out the vibrant tech community on one of the world's most
> > > > engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> > > > ___
> > > > Gambas-user mailing list
> > > > Gambas-user@lists.sourceforge.net
> > > > https://lists.sourceforge.net/lists/listinfo/gambas-user
> > >
> > >
> > > 
> > > --
> > > Check out the vibrant tech community on one of the world's most
> > > engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> > > ___
> > > Gambas-user mailing list
> > > Gambas-user@lists.sourceforge.net
> > > 

Re: [Gambas-user] A question about WebView

2016-10-14 Thread Gianluigi
Lucky you Jorge,
if here in Genoa, today not there had been a whirlwind (no electricity and
discarge notebook :-( ) I (too) would have answered so:
'--
Public Sub Form_Open()

  WebView1.HTML = MakeHtml()

End

Private Function MakeHtml() As String

  Dim sHtml As String

  sHtml = "" & "\n"
  sHtml &= "" & "\n"
  sHtml &= "" & "\n"
  sHtml &= "http://gambaswiki.org/wiki\;
onclick=\"myFunction(event)\">Documentation" & "\n"
  sHtml &= "" & "\n"
  sHtml &= "function myFunction(event) {" & "\n"
  sHtml &= "event.preventDefault();" & "\n"
  sHtml &= "document.getElementById(\"myAnchor\").innerHTML =
\"Canceled\";" & "\n"
  sHtml &= "}" & "\n"
  sHtml &= "" & "\n"
  sHtml &= "" & "\n"
  sHtml &= "" & "\n"

  Return sHtml

End

Public Sub Form_Close()

  Print WebView1.HTML

End
'--
It is no good code, but I had come this way.
As I'm starting to study WebView I wanted to ask you, this is how it should
be implemented the script.
Otherwise?
Can you give me any suggestions?

Regards
Gianluigi

2016-10-14 17:25 GMT+02:00 Jorge Carrión :

> Well... I think that I've found a workaround only with gambas. (It's a
> little tricky but it works),
>
> Thank you for the answers.
>
> Best Regards
>
> 2016-10-14 15:03 GMT+02:00 Moviga Technologies :
>
> > There might be a way to do it with Gambas, but you can use javascript's
> > preventDefault()
> >
> > http://www.w3schools.com/jsref/event_preventdefault.asp
> >
> >
> > Den 14. okt. 2016 12:15, skrev Jorge Carrión:
> > > I'm trying to do a control like textEdit, but allowing with links and
> > > images, based on webBrowser example.
> > >
> > > All is done and works fine, but if I create a link ( I
> > > click on it the webview, naturally, follows the link and I loose all
> the
> > > changes on the page.
> > >
> > > I want prevent that behaviour in the way that if user clik on a link
> and
> > > the editable property is true, the webview doesn't follow the link.
> > >
> > > Hope this will be more clear.
> > >
> > > Best Regards
> > >
> > > 2016-10-14 11:39 GMT+02:00 Gianluigi :
> > >
> > >> Hello Jorge,
> > >> I do not understand the question, could you be more specific?
> > >> Thank you
> > >> Gianluigi
> > >>
> > >> 2016-10-13 18:29 GMT+02:00 Jorge Carrión :
> > >>
> > >>> Is there a way to stop the follow of links in webview when webview is
> > in
> > >>> "edit mode" (editable=true)?
> > >>>
> > >>> Best Regards
> > >>> 
> > >>> --
> > >>> Check out the vibrant tech community on one of the world's most
> > >>> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> > >>> ___
> > >>> Gambas-user mailing list
> > >>> Gambas-user@lists.sourceforge.net
> > >>> https://lists.sourceforge.net/lists/listinfo/gambas-user
> > >>>
> > >> 
> > >> --
> > >> Check out the vibrant tech community on one of the world's most
> > >> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> > >> ___
> > >> Gambas-user mailing list
> > >> Gambas-user@lists.sourceforge.net
> > >> https://lists.sourceforge.net/lists/listinfo/gambas-user
> > >>
> > > 
> > --
> > > Check out the vibrant tech community on one of the world's most
> > > engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> > > ___
> > > Gambas-user mailing list
> > > Gambas-user@lists.sourceforge.net
> > > https://lists.sourceforge.net/lists/listinfo/gambas-user
> >
> >
> > 
> > --
> > Check out the vibrant tech community on one of the world's most
> > engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> > ___
> > Gambas-user mailing list
> > Gambas-user@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/gambas-user
> >
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> ___
> Gambas-user mailing list
> Gambas-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>
--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] A question about WebView

2016-10-14 Thread Jorge Carrión
Well... I think that I've found a workaround only with gambas. (It's a
little tricky but it works),

Thank you for the answers.

Best Regards

2016-10-14 15:03 GMT+02:00 Moviga Technologies :

> There might be a way to do it with Gambas, but you can use javascript's
> preventDefault()
>
> http://www.w3schools.com/jsref/event_preventdefault.asp
>
>
> Den 14. okt. 2016 12:15, skrev Jorge Carrión:
> > I'm trying to do a control like textEdit, but allowing with links and
> > images, based on webBrowser example.
> >
> > All is done and works fine, but if I create a link ( > click on it the webview, naturally, follows the link and I loose all the
> > changes on the page.
> >
> > I want prevent that behaviour in the way that if user clik on a link and
> > the editable property is true, the webview doesn't follow the link.
> >
> > Hope this will be more clear.
> >
> > Best Regards
> >
> > 2016-10-14 11:39 GMT+02:00 Gianluigi :
> >
> >> Hello Jorge,
> >> I do not understand the question, could you be more specific?
> >> Thank you
> >> Gianluigi
> >>
> >> 2016-10-13 18:29 GMT+02:00 Jorge Carrión :
> >>
> >>> Is there a way to stop the follow of links in webview when webview is
> in
> >>> "edit mode" (editable=true)?
> >>>
> >>> Best Regards
> >>> 
> >>> --
> >>> Check out the vibrant tech community on one of the world's most
> >>> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> >>> ___
> >>> Gambas-user mailing list
> >>> Gambas-user@lists.sourceforge.net
> >>> https://lists.sourceforge.net/lists/listinfo/gambas-user
> >>>
> >> 
> >> --
> >> Check out the vibrant tech community on one of the world's most
> >> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> >> ___
> >> Gambas-user mailing list
> >> Gambas-user@lists.sourceforge.net
> >> https://lists.sourceforge.net/lists/listinfo/gambas-user
> >>
> > 
> --
> > Check out the vibrant tech community on one of the world's most
> > engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> > ___
> > Gambas-user mailing list
> > Gambas-user@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/gambas-user
>
>
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> ___
> Gambas-user mailing list
> Gambas-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>
--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] A question about WebView

2016-10-14 Thread Moviga Technologies
There might be a way to do it with Gambas, but you can use javascript's 
preventDefault()

http://www.w3schools.com/jsref/event_preventdefault.asp


Den 14. okt. 2016 12:15, skrev Jorge Carrión:
> I'm trying to do a control like textEdit, but allowing with links and
> images, based on webBrowser example.
>
> All is done and works fine, but if I create a link ( click on it the webview, naturally, follows the link and I loose all the
> changes on the page.
>
> I want prevent that behaviour in the way that if user clik on a link and
> the editable property is true, the webview doesn't follow the link.
>
> Hope this will be more clear.
>
> Best Regards
>
> 2016-10-14 11:39 GMT+02:00 Gianluigi :
>
>> Hello Jorge,
>> I do not understand the question, could you be more specific?
>> Thank you
>> Gianluigi
>>
>> 2016-10-13 18:29 GMT+02:00 Jorge Carrión :
>>
>>> Is there a way to stop the follow of links in webview when webview is in
>>> "edit mode" (editable=true)?
>>>
>>> Best Regards
>>> 
>>> --
>>> Check out the vibrant tech community on one of the world's most
>>> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>>> ___
>>> Gambas-user mailing list
>>> Gambas-user@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/gambas-user
>>>
>> 
>> --
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>> ___
>> Gambas-user mailing list
>> Gambas-user@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/gambas-user
>>
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> ___
> Gambas-user mailing list
> Gambas-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user


--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] A question about WebView

2016-10-14 Thread Jorge Carrión
I'm trying to do a control like textEdit, but allowing with links and
images, based on webBrowser example.

All is done and works fine, but if I create a link (:

> Hello Jorge,
> I do not understand the question, could you be more specific?
> Thank you
> Gianluigi
>
> 2016-10-13 18:29 GMT+02:00 Jorge Carrión :
>
> > Is there a way to stop the follow of links in webview when webview is in
> > "edit mode" (editable=true)?
> >
> > Best Regards
> > 
> > --
> > Check out the vibrant tech community on one of the world's most
> > engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> > ___
> > Gambas-user mailing list
> > Gambas-user@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/gambas-user
> >
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> ___
> Gambas-user mailing list
> Gambas-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>
--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] A question about WebView

2016-10-14 Thread Gianluigi
Hello Jorge,
I do not understand the question, could you be more specific?
Thank you
Gianluigi

2016-10-13 18:29 GMT+02:00 Jorge Carrión :

> Is there a way to stop the follow of links in webview when webview is in
> "edit mode" (editable=true)?
>
> Best Regards
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> ___
> Gambas-user mailing list
> Gambas-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>
--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] A question about WebView

2016-10-14 Thread Gianluigi
Hello Jorge,
I do not understand the question, could you be more specific?
Thank you
Gianluigi

2016-10-13 18:29 GMT+02:00 Jorge Carrión :

> Is there a way to stop the follow of links in webview when webview is in
> "edit mode" (editable=true)?
>
> Best Regards
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> ___
> Gambas-user mailing list
> Gambas-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>
--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] A question about WebView

2016-10-13 Thread Jorge Carrión
Is there a way to stop the follow of links in webview when webview is in
"edit mode" (editable=true)?

Best Regards
--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user