Solved

DBText component displays below other controls....

Posted on 2004-04-18
4
210 Views
Last Modified: 2010-04-05
Hi there,
I am building a component that is based on TDBtext, the idea is the component will display something like the popup hint feature for buttons etc on my form. That part is working ok however when the component displays it displays underneath all other features on the form.

I have tried right clicking on the component and going control/bring to front but this does not work.

I think this is a general problem that I am not sure how to overcome. The same thing happens if you just drop a label and a button onto the form. The label will be hidden by the button if you place one on top of the other

Does anyone have any ideas how to solve this issue?

Thanks Myles :)
0
Comment
Question by:myleseven2
4 Comments
 
LVL 17

Accepted Solution

by:
mokule earned 165 total points
ID: 10857182
Hi,

I would place TDBText on a TPanel. It can be bring to front.
0
 
LVL 12

Expert Comment

by:Ivanov_G
ID: 10857457

  DBText1.BringToFront;

 
0
 

Author Comment

by:myleseven2
ID: 10863532
Hi Ivanov G I have tried

DBText1.BringToFront;

and it didin't work, did it work for you?

Mokule... I think that lacing it on a panel might be a good option I shall have a go at that and let you know if it works thanks :)

0
 
LVL 1

Expert Comment

by:AngelRider
ID: 10880496
I think the problem stems from the fact that TDBLabel is not a descendant of TWinControl, and therefore doesn't have a window handle. Without a window handle, the control can only exist on the surface of it's parent - it doesn't understand the concept of z-order and cannot float independently above it's parent.

Mokule's idea is a neat solution - another way to do it would be to derive from TDBEdit, and set the control's BorderStyle to bsNone, and it's Color to clBtnFace. Then make it read-only.

You now have a single component that looks exactly like a TDBEdit, but has a window handle - therefore you can move it back and forth in the form's z-order.

Hope that helps.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

743 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now