Results 1 to 3 of 3

Thread: Is It Possible To Make A webBrowser Control "Wrap" Its Contents?

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jul 2006
    Posts
    219

    Question Is It Possible To Make A webBrowser Control "Wrap" Its Contents?

    I'm working a project I can't discuss on here, but could someone tell me if it's possible to make a webBrowser control to have its contents wrapped like you can wrap the text in a textBox control? If it's possible, could you please tell me how to go about this?

    Thanks,
    Louix

  2. #2
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: Is It Possible To Make A webBrowser Control "Wrap" Its Contents?

    the browser displays HTML. So if the HTML it is displaying is designed to wrap, then it will. If it is not, you get scroll bars. It is pretty much that simple.

    If you are talking about going to an existing site, and rendering their site differnetly, then that would require you to implement your own HTML rendering engine, and not use the browser control in the first place.

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Jul 2006
    Posts
    219

    Re: Is It Possible To Make A webBrowser Control "Wrap" Its Contents?

    Thanks for replying
    I found a way to do it by using the CSS property, "word-wrap".

    CSS:
    Code:
    word-wrap: break-word;
    JavaScript:
    Code:
    document.body.style.wordWrap = 'break-word';

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width