PRB: zOrder Property Cannot Be Set On Windowed Controls

ID: Q177378


The information in this article applies to:
  • Microsoft Internet Explorer (Programming) versions 4.0, 4.01, 5.0


SYMPTOMS

Setting the zOrder of a control has no effect.


CAUSE

The zOrder cannot be set for windowed controls.


STATUS

This behavior is by design.


MORE INFORMATION

The following HTML attempts to set the zOrder on an <SELECT> control:


<HTML>
<BODY>

<SELECT MULTIPLE
   ID=test STYLE="position:absolute; top:15; left:10; z-index:-20">
<option>one</option>
<option>two</option>
<option>three</option>
</SELECT>

<P style="font:15pt arial">this is some text</p>
</BODY>
</HTML> 
It would appear that the text "this is some text" should appear over the <SELECT> control. In fact, since the <SELECT> control is a windowed control this is not possible.

The zOrder property is documented as applying to the <OBJECT> tag. Again, this will work only if the control named by the <OBJECT> tag is windowless. By default, MFC and Visual Basic controls are windowed. ATL controls are by default windowless. Any control that subclasses a windows common control will be windowed. If you are uncertain whether a control is windowed or not, the Spy++ program that ships with Visual C++ can be used to find out whether a window is associated with a control or not.


REFERENCES

For more information, please see the MSDN Web Workshop:

http://msdn.microsoft.com/workshop/default.asp

Additional query words:

Keywords : kbIE500 InetSDKControlUsag AXSDKIEScripting AXSDKScripting
Version : WINDOWS:4.0
Platform : WINDOWS
Issue type : kbprb


Last Reviewed: April 30, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.