Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problems with DHTML Disable option

Status
Not open for further replies.

shetlandbob

Programmer
Mar 9, 2004
528
GB
Hi,

I have a DHTML document which I load up in a Visual C++.Net application.

I use

Code:
  dhtml.loadDocument( VARIANT("FILE"))
to load a file that I create in my code. This works fine, however if I have the dhtml object "disabled" (thus user cant change values ) then I cannot scroll in the window (i have set formats to use and thus have disabled line wrapping).

If I set "disable = false" then I can scroll in the window but the user can delete the text in the dhtml window??

Any ideas how I can set the dhtml window so the user can scroll to the window extents ( up/down and across ) but cannot change the contents of the window?

Thanks
 
try:
dhtml.loadDocument(_variant_t("FILE"))

Ion Filipski
1c.bmp
 
The document loads up fine, its just that I cant scroll in the window and protect the data in the window (like standard htmls)
 
I think you're using the control "DHTMLEdit.DHTMLEdit"(DHTML Edit Control for IE5). The purpose of this component is to edit because it is an editor. There is also another DHTML that is safe. It is "DHTMLSafe.DHTMLSafe" (DHTML Edit Control Safe for Scripting for IE5)

Ion Filipski
1c.bmp
 
For info:

The problem was that one of the properties in my control the "Dhtml.browse" was set to false, which in essense makes it an editor. If this is set to "true" then it works like IE.

The DHTMLSafe.DHTMLSafe control is generally used for secure websites (i.e. you have no access to locally stored files, can only access files on the original server etc.......).

This is correct as far as my understanding goes!! So if I'm wrong then so be it.........

see

for more on dhtml's
 
I've just taken a look into OleView and saw this property:
void Scrollbars([in] VARIANT_BOOL rhs);

Maybe it would help...

Ion Filipski
1c.bmp
 
Yeh I'd seen that variable, it was set to true. When I had the problem, the scroll bars were there they just didn't work!!!

Cheers for the help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top