7 Replies Latest reply on May 27, 2014 7:30 AM by calebmiranda

    text to fit webviewer



      text to fit webviewer


           Hi guys, please, a little help.

           I have a webviewer used to display some text from some fields. But the webviewer keeps giving me a horizontal scroll bar. What am I doing wrong? Thanks for the help

           # I have edited this post, as I have posted some screenshots down there. It's easier to read the code with the webviewer look side-by-side

        • 1. Re: text to fit webviewer
          To get rid of scrollbars, I usually use overflow:hidden; It can be used a style on the offending container object. In your case, it might serve well in with the rest of your body styles. Hard to say without knowing more. There are similar tags to let you hide a specific scrollbar too.
          • 2. Re: text to fit webviewer

                 Hey Matthew, thanks for the idea. Your solution works as I asked, but is not what I meant. You literally hide the scrollbar, but what I need is, actually, to have the text inside the webviewer window.

                 Let me share three printscreens

                 What I need is:

                 - text to fit web viewer (being clear: I want to not need a scroll bar)

                 - indentation mantained on text (I use it quite a lot in my records)

            • 3. Re: text to fit webviewer
              /files/97e6149cdd/Screenshot_2014-05-27_10.31.57.png 1029x688
              • 4. Re: text to fit webviewer
                /files/0249aa4459/Screenshot_2014-05-27_10.31.16.png 1029x687
                • 5. Re: text to fit webviewer

                       In the third screenshot, I have the simplest code but I lose the indentation (all the paragraphs begin with a "tab").

                       In the second screenshot, I worked the code a little more, so it has the <style> and </style>, I keep my indentation but I loose the "fit to width"

                       in the first screenshot, I have the fanciest code, but as I discovered I have lost the indentation again.


                       Also, in the first screenshot, I have an unwanted space in the top of the webviewer. It should not happen


                       If anyone know how to solve it, please, help me.

                       If I forgot to give any specific details, please, ask me and I will answer asap.

                  • 6. Re: text to fit webviewer

                         Hi H1$c;

                         I'm going to be just spit-balling, as I'm not a web expert... but here are some thoughts of things you can try out anyway.

                         Often times, as I'm sure you're already aware, whitespaces get ignored in HTML.  To make sure your spaces are to be included, I often resort to using   characters.  One way you could accomplish this would be to use a calculation like:

                         Left ( "            " ; 6 * <<insertNumberOfSpacesDesiredHere>> ).

                         Of course, this example will only allow you to have up to 12 spaces, but you get the idea.

                         I hope this helps you out.


                    • 7. Re: text to fit webviewer

                           Neat. I used a simple code that solved my issued. I'll post for anybody else who needs help:


                           Thanks a lot!




                           Substitute(GetAsCSS(Substitute(itens::itemTeor;Char(9);"symbolstoneverconfusewiththetextoftherecord have a space here symbolstoneverconfusewiththetextoftherecord");"symbolstoneverconfusewiththetextoftherecord have a space here symbolstoneverconfusewiththetextoftherecord";"        ")&"