Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to change the selected color in TEdit

220 views
Skip to first unread message

Chris Günther

unread,
Nov 9, 1998, 3:00:00 AM11/9/98
to
Hi,

is there anybody knowing how to change the selected color
of a TEdit ?



thanks and greetings from Cologne
Chris

-------------------------------------------------------
Chris Günther
chr...@netcologne.de or g...@ifacs.de
-------------------------------------------------------

Mark Richter

unread,
Nov 9, 1998, 3:00:00 AM11/9/98
to
The selected color for TEdit is taken from the Windows color scheme. I
don't know which one specifically.

You may, or may not, be able to modify this independently since this
behavior is embedded within the Windows control, not within Delphi...

--
Mark Richter
eMCee Software

Bob Arnson

unread,
Nov 10, 1998, 3:00:00 AM11/10/98
to
On Mon, 09 Nov 1998 21:17:07 +0100, Chris Günther wrote:

> is there anybody knowing how to change the selected color
>of a TEdit ?

Edit controls paint selected text according to the user's choice of
system color.

sig://boB/TeamB


Kurt Barthelmess (TeamB)

unread,
Nov 10, 1998, 3:00:00 AM11/10/98
to
Chris -

That color is determined by the user when they select their desktop
settings. You can change it, but the effect is global - not just for
your control but all applications. That is considered "rude".

Good luck.

Kurt

Hamish Williams

unread,
Nov 10, 1998, 3:00:00 AM11/10/98
to
It's a lot of work for what seems like very little gain and a different
selected colour may confuse the users, but if you wanted to do it you could
paint the edit control yourself.

Hamish.
http://dspace.dial.pipex.com/hamish.williams/


Chris Günther

unread,
Nov 10, 1998, 3:00:00 AM11/10/98
to 71333...@compuserve.com
Hello,

That's what I mean. Is there any way to play with own (app-wide)
selected color ?
>
> Good luck.
>
> Kurt

Paul Cazan

unread,
Nov 11, 1998, 3:00:00 AM11/11/98
to
Chris Günther wrote:

> how to change the selected color of a TEdit ?

You could create your ownerdrawn TEdit, and paint everything with your
own colors. The problem appears when you try to ownerdraw a TMemo, but
for TEdit seems to be simpler. Just try it and if you cannot do it, I'll
try to do it myself when having some free time.

Hope this helps.

-----------------------------------
Paul Christian Cazan
Delphi programmer at Atis Bucharest
Office Phone: +40 01 2523609
E-mail: paul...@iname.com
-----------------------------------

0 new messages