?
Solved

DBText component displays below other controls....

Posted on 2004-04-18
4
Medium Priority
?
222 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 17

Accepted Solution

by:
mokule earned 660 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses
Course of the Month12 days, 3 hours left to enroll

752 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