Real Software Forums
http://forums.realsoftware.com/

Need a Styled HTML Text Custom Control WebLabel
http://forums.realsoftware.com/viewtopic.php?f=24&t=47232
Page 1 of 1

Author:  xbww [ Sat Mar 09, 2013 12:18 pm ]
Post subject:  Need a Styled HTML Text Custom Control WebLabel

Has anyone created a WebLabel with the Web Control SDK that is capable of displaying styled HTML text?

What I am looking for is a way to show html in a WebLabel with a few attributes, such as bold, bolditalic, italic and boldunderline within the text.

Author:  kevo [ Sun Mar 10, 2013 9:10 am ]
Post subject:  Re: Need a Styled HTML Text Custom Control WebLabel

I haven't done it, but I did go through the WebSDK docs while working on another issue, and I think the example in the docs would probably get you 90% of the way to what you want.

You might want to try that out and see if it fits.

Author:  taylor-design [ Sun Mar 10, 2013 10:12 am ]
Post subject:  Re: Need a Styled HTML Text Custom Control WebLabel

You can display arbitrary HTML in the WebHTMLViewer control.

Author:  swort [ Sun Mar 10, 2013 11:27 am ]
Post subject:  Re: Need a Styled HTML Text Custom Control WebLabel

kevo wrote:
I haven't done it, but I did go through the WebSDK docs while working on another issue, and I think the example in the docs would probably get you 90% of the way to what you want.

You might want to try that out and see if it fits.


This page is way better for me:
http://docs.realsoftware.com/index.php/ ... rolWrapper

Author:  xbww [ Mon Mar 11, 2013 6:46 pm ]
Post subject:  Re: Need a Styled HTML Text Custom Control WebLabel

Quote:
You can display arbitrary HTML in the WebHTMLViewer control.


I tried this, maybe I am doing something wrong, I created a new WebApp, put an HTMLViewer on it and created two buttons.

Button1
HTMLViewer1.LoadPage("This is a <b>test 1</b>")

Button 2
HTMLViewer1.LoadPage("This is a <b>test 2</b>")

I run the app and press button1 and then button 2. It works fine. I keep going back and forth and the text changes. But I noticed the browser forward/back buttons start working and you can actually go back and forward but it only affects the text in the HTMLViewer. If you play around with it you will see what I mean. Seems to be a bad situation. A user can click back on their browser and change the text to a prior version that you had loaded, but your app continues on as if nothing changed. I am sure it has to do with the loadpage method confusing the browser. I am using Chrome on Windows by the way.

Page 1 of 1 All times are UTC - 5 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/