?
Solved

TEdit

Posted on 1998-11-22
6
Medium Priority
?
380 Views
Last Modified: 2010-04-04
How to make TEdit but descends from TGraphicControl.
0
Comment
Question by:joely
[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
  • 3
  • 2
6 Comments
 
LVL 5

Expert Comment

by:scrapdog
ID: 1347623
For what purpose?
0
 
LVL 1

Accepted Solution

by:
sassas081597 earned 100 total points
ID: 1347624
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
ID: 1347625
I just want this component looks transparent.
Do you have any idea ?

0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Expert Comment

by:sassas081597
ID: 1347626
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
ID: 1347627
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
ID: 1347628
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

777 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