PRB: zOrder Property Cannot Be Set On Windowed Controls

Last reviewed: January 19, 1998
Article ID: Q177378
The information in this article applies to:
  • Microsoft Internet Explorer (Programming), versions 4.0, 4.01

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

The Internet Client SDK - Component Development / ActiveX Controls

Keywords          : AXSDKSripting InetSDKControlUsag AXSDKIEScripting
Technology        : kbInetDev kbole
Version           : WINDOWS:4.0
Platform          : WINDOWS
Issue type        : kbprb


================================================================================


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: January 19, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.