Link to home
Start Free TrialLog in
Avatar of mazkoory
mazkoory

asked on

labels and memos box's

i have a

Label & a Memo box,

Label has the caption 'HELLO',

what ive been trying to do is to place the 'HELLO' over the memo box, (dont ask why! long story)

every time i move the label property over the Memo box,
the words dont appear, the memo box is always on TOP if you know what im getting at!

any way of getting this sorted???

or is that how delphi works?

ASKER CERTIFIED SOLUTION
Avatar of andrewjb
andrewjb
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of pderuiter
pderuiter

controls always are on top of non-controls and a TLabel is not a control, while a TMemo is.
Indeed TStaticText is a control.
Avatar of StevenB
pderuiter is partially correct, however his terminology is slightly incorrect. Both TLabel and TMemo are "controls", indeed all visual components inherited from TControl are "controls". There is a significant division, however, between "windowed controls" and "graphical controls". Windowed controls, such as TMemo, inherit from TControl and then TWinControl. Graphical controls, such as TLabel, inherit from TControl and then TGraphicControl. The simple z-ordering rule for forms is that graphic controls cannot display in front of windowed controls with the same Parent.
Here's a shortcut that I used in Delphi 5.

Place memo1 on form.
Place label1 on memo1.

View form as text.

cut and paste label1 properties and details under the memo1 properties, i.e. the label becomes a property of memo1.

try it and let us know.

it works for me.

s.
I stand corrected Steven :) bit too hasty with my reply
mazkoory:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area for this question:
       to split points between andrewjb and SeanK
Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

Some days and here is the Christmas Time. I wish good luck and good health for you all and for your loved ones

kacor
EE Cleanup Volunteer
 OK, but Sean is wrong in saying that "the label becomes a property of memo1" In fact what his solution describes is a way of making memo1 become the PARENT of the label.