Solved

TEdit

Posted on 1998-11-22
6
374 Views
Last Modified: 2010-04-04
How to make TEdit but descends from TGraphicControl.
0
Comment
Question by:joely
  • 3
  • 2
6 Comments
 
LVL 5

Expert Comment

by:scrapdog
Comment Utility
For what purpose?
0
 
LVL 1

Accepted Solution

by:
sassas081597 earned 50 total points
Comment Utility
TGraphicControl cannot catch the events as TWinControls can. However you can create a TLabel which looks like TEdit and use the Form's events to change the label. The only problem is that you cannot have the label focused - so your control must be alone on the form to be shure that the form sends correct commands:
procedure MyForm.OnKeyPress(...)
begin
   grLabel.Caption:=grLabel.Caption+Key;
end;
If you are interested in a TLabel that looks like TEdit - give a comment and I'll send you the WWW-Page where it can be found.
0
 

Author Comment

by:joely
Comment Utility
I just want this component looks transparent.
Do you have any idea ?

0
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!

 
LVL 1

Expert Comment

by:sassas081597
Comment Utility
What do you mean for transparent?
This is a TGraphicControl - you either draw something or set the transparent property to TRUE and write down only the text (however you can draw borders too). So please explain what would you like to have more precizely.

SASSAS
0
 

Author Comment

by:joely
Comment Utility
I want the descends from TGraphicControl can receive input like TEdit. So if I put TImage as a background, I can see the background through this component. TEdit can't handle this because TEdit is a descends from TWinControl.
0
 
LVL 1

Expert Comment

by:sassas081597
Comment Utility
Another time, the TGraphicControl cannot be in Focuse - so you should have another component to receive focuse and to send some message to TGraphicControl. The best way is to use TForm for that purpose as shown in the answer. However you can use other controls which can receive focus.
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

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
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…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

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

14 Experts available now in Live!

Get 1:1 Help Now