6 Replies Latest reply on Apr 16, 2008 1:56 AM by ab1301

    Increasing Text Size in HTML

    ab1301 Level 1
      Is there a way to increase the size of the text shown in an html component in air (similar to the zoom in a browser)?
        • 1. Re: Increasing Text Size in HTML
          ab1301 Level 1
          Anyone?
          • 2. Re: Increasing Text Size in HTML
            ntsiii Level 3
            Can you explain what you want in more detail? I do not know what "zoom in a browser" means.

            Tracy
            • 3. Re: Increasing Text Size in HTML
              slaingod Level 1
              I think he means using the WebKit component, how do you do a text sizing zoom. I don't know the answer off the top of my head.
              • 4. Re: Increasing Text Size in HTML
                ntsiii Level 3
                Ah, thanks. I missed that this was AIR. I can't help there.
                Tracy
                • 5. Re: Increasing Text Size in HTML
                  ab1301 Level 1
                  Yeah, I am talking about an Air application. I am displaying html files in an mx:HTML component. The text displayed in the Air application seems small. I would like to make it bigger, without altering the html files.
                  • 6. Re: Increasing Text Size in HTML
                    ab1301 Level 1
                    Attached is my solution to this problem. I call the function on the html's locationChange event. Its really hacky, and it doesn't work perfectly, but I can't waste any more time trying to figure this out. There has to be a better way to do this: #1, I shouldn't have to go into the style sheets in the actual html document to enlarge the text rendered in the AIR app. #2, even if I do, there has to be a better way of doing it than regexp.

                    In the Flex 3 Help, there is a page titled "Manipulating an HTML stylesheet from ActionScript," but that only addresses changing already existing CSS rules using their index numbers. This assumes that the document you are viewing has CSS rules to begin with, and that you already know the index number for the rules you want to change. There is a cryptic statement at the end of the help, which says "Keep in mind that code can add styles to the page after the HTMLLoader object dispatches the complete event." It would be nice to see some examples or explanation of how to do this.