描述:
程序中使用了一个内嵌的WebBrowser,可编辑,现在问题是在WebBrowser中编辑文字时不会自动换行,即会出现HScroll bar,要回车才换行。有没有人知道如何可以使WebBrowser编辑器能自动换行,而不出现HScroll bar, 谢谢!
解决方案1:
up
解决方案2: HTML { white-space : sWrap }
Scripting object.style.whiteSpace(v) [ = sWrap ]
Possible Values
sWrap String that specifies or receives one of the following values.normal Default. Lines of text break automatically. Content wraps to the next line if it exceeds the width of the object.
nowrap Line breaks are suppressed. Content does not wrap to the next line.
pre Line breaks and other whitespace are preserved. This possible value is supported in Internet Explorer 6 and later when the !DOCTYPE declaration specifies standards-compliant mode. When the !DOCTYPE declaration does not specify standards-compliant mode, you can retrieve this value, but it does not affect rendering—it functions like the normal value.
The property is read/write for all objects except the following, for which it is read-only: currentStyle. The property has a default value of normal. The Cascading Style Sheets (CSS) attribute is inherited.
Expressions can be used in place of the preceding value(s), as of Microsoft® Internet Explorer 5. For more information, see About Dynamic Properties.
WebBrowser中加个表格(<table>)并设置表格的宽度。
您可能想查找下面的文章:
- IWebBrowser2::Navigate的问题
- IWebBrowser2::Navigate的问题
- 求救:两次添加同一个控件(Webbrowser控件),报告重定义,怎么办哦?
- 两次添加同一个控件(Webbrowser控件),报告重定义,怎么办哦?
- 调用WebBrowser->Navigator2,不产生DocumentComplete事件
- 请教IWebBrowser2问题~~~~~~~~~在线等
- 如何用IWebBrowser2判断当前窗口是否处于激活状态?
- 如何控制WebBrowser,并使其提交其中的网页或者操纵其中的文本框等?
- WebBrowser控件中怎么禁止js代码的执行?
- ATL下有没有包装过的(基础是IWebBrowser2)的浏览器控件可用?或者哪里有源代码可以下载?