Solved

Priority of Controls placed over each other

Posted on 2006-06-14
3
210 Views
Last Modified: 2010-04-07
If I first place a Textbox on a form and then place a Datagrid on the form the Datagrid has priority i.e. if I move the Datagrid over the Textbox the Datagrid hides the Textbox. However if I place the Datagrid on the form first and then place the Textbox on the form and again move the Datagrid over the Textbox - the Textbox shows through the Datagrid i.e. the Datagrid appears transparent. Is there a property that determines this behaviour? I want the Datagrid to hide the underlying Textbox. I can solve this in one of 2 ways: 1) I can place the Datagrid on the form last or 2) I can programatically make the underlying Textbox invisible. However I am curious to know what determines this behaviour.
0
Comment
Question by:cdv
3 Comments
 
LVL 85

Assisted Solution

by:Mike Tomlinson
Mike Tomlinson earned 125 total points
ID: 16904294
You can make the DataGrid come to the front by using the ZOrder method.

Something like...

    Private Sub Form_Load()
        DBGrid1.ZOrder 0
    End Sub
0
 
LVL 1

Accepted Solution

by:
Extortioner15 earned 125 total points
ID: 16904314
right-click the item you want behind the other object, and choose "Send to Back". That should do the trick nomather the order you put it in!
0
 

Author Comment

by:cdv
ID: 16906711
Thanks. Both answers have answered the question.
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

860 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question