Allow HTML in Form.Text

Answered
0
0

Can you add .AllowHTML in form.text property please?

And if you are able to do that – is there a javascript or css way to do so currently?

 

I want to do something like this:

Form.text = “<b>Product Name</b> – Welcome”

 

Any help? Thanks in advance for consideration.

  • You must to post comments
Best Answer
0
0

Hi Matthew,

you´re very close !
There´s a difference with the VB.NET compiler. It does not use the folder to create the resource name,
so you need to name the file including the folder:

screen

You can leave the file in the folder since the compiler just ignores it.

Best regards
Frank

Attachment
  • You must to post comments
0
0

Thanks Frank – I’m in business now.  It works as you describe!

Matthew

  • You must to post comments
0
0

Thank you for the sample Frank, but I’m having a bit of trouble.

I need to do this in vb.net.  Your c# example runs fine on my machine, and produces the expected html in the form’s text property.

However – when I build a vb.net project that tries to do this – it does not work.  I’ve replicated everything in your project, including merging in WiseJResources as an assembly in AssemblyInfo.vb.  I have the js file as an embedded resource under a “Platform” folder ( I also tried “Resources”).  I overrode the OnWebRender in the form.

No joy.  What happens is the project just hangs when you run it – you see the spinner for a few seconds and then nothing – just white page.  It never loads the form.  If I comment out the one line in OnWebRender: config.className = “my.FormWithHtmlTitle”  – then the form loads as normal (although with html tags in the text of course since the class didn’t get applied).

Attached is a sample vb.net project that is not working.  As far as I can tell – I have done everything exactly the same as your working c# sample, except in vb.net.

 

Any help?

 

 

 

 

 

 

  • You must to post comments
0
0

Hi Matthew,

I attached a sample that shows one way to use html in the title of a form.
It creates a new class in an embedded javascript file:

windowtitlejs

And applies that class OnWebRender:

windowtitle

Resulting in a form title like this:

windowtitle_screen

Hope that helps.

Best regards
Frank

  • You must to post comments
Showing 4 results
Your Answer

Please first to submit.