I have run into the issue where WebLink styles within a web project dont get applied. This has been logged as a feedback case <https://xojo.com/issue/17670> and a workaround was provided by Greg. Sadly that workaround has an issue that make it unusable for me in that it does not allow you to set the target window. I cant use an HTMLviewer because this opens the URL in a frame and the Royal Mail Tracking page does not allow you to open it in a frame and just returns a blank page (it is also part of their T&Cs for using it that you wont show in a frame).
The only workaround I have come up with is to add a style to the HTML Header that tweaks the Xojo style I am using to force the hover and visited styles but this is a bit of hack and I was wondering if anyone else has a solution?
Also, this case has been open for over 3 years now, is it going to be fixed any time soon because it cant be that big a bug can it?
Change the super Weblink to label
Set a style with underline (if needed)
Place in MouseDown Event
#pragma unused X
#pragma unused Y
#pragma unused Details
showURL("Http://" + me.text,true) 'true is for target new Window
set .text to some URL like www.xojo.com
[quote=98765:@Nathan Wright]I have run into the issue where WebLink styles within a web project dont get applied. This has been logged as a feedback case <https://xojo.com/issue/17670> and a workaround was provided by Greg. Sadly that workaround has an issue that make it unusable for me in that it does not allow you to set the target window. I cant use an HTMLviewer because this opens the URL in a frame and the Royal Mail Tracking page does not allow you to open it in a frame and just returns a blank page (it is also part of their T&Cs for using it that you wont show in a frame).
The only workaround I have come up with is to add a style to the HTML Header that tweaks the Xojo style I am using to force the hover and visited styles but this is a bit of hack and I was wondering if anyone else has a solution?
Also, this case has been open for over 3 years now, is it going to be fixed any time soon because it cant be that big a bug can it?[/quote]
Maybe a little late to the party, but you can always use HashTags in your links, so instead of having the browser navigate directly to the target, it gives you a chance to manage them in your app through HashTagChanged like the Hot Spot projects we talked about a while ago. So when you get the hash tag for Royal Mail, it gives you a chance to open the link in a new window or in a browser application.