Board index » cppbuilder » TEdit component

TEdit component


2005-04-13 10:10:22 PM
cppbuilder98
how I do ?
if selected the tedit component when paniting bacgroud tihs component.
 
 

Re:TEdit component

Quote
how I do ? if selected the tedit component when
paniting bacgroud tihs component.
If I understoud well, you want to know how to
set the background color of TEdit.
If that's the case, TEdit has a property Color which you
can set at design-time (from Object inspector) or at run-time:
// for example:
Edit1->Color = clCream;
If that's not the case, I'm afraid that you should reformulate
the question.
--
Best regards,
Vladimir Stefanovic
 

Re:TEdit component

if cursor in edit1 when paint red.
if cursor in edit2 when paint edit2->red and edit1->old color
"nkyek" < XXXX@XXXXX.COM >, haber iletisinde žunlar?
yazd? XXXX@XXXXX.COM ...
Quote
how I do ?
if selected the tedit component when paniting bacgroud tihs component.




 

{smallsort}

Re:TEdit component

nkyek wrote:
Quote
if cursor in edit1 when paint red.
if cursor in edit2 when paint edit2->red and edit1->old color

use the OnMouseMove Event if you want to do something when the cursor is
moving over an object.
ex.
if ( Edit1->Color == clWindow )
Edit1->Color = clRed;
else
Edit1->Color = clWindow;
may want to set a flag as well so that if it is already set to a
particular color then don't do a change color.
hopet this helps.
shannon
 

Re:TEdit component

"SP" < XXXX@XXXXX.COM >wrote in message
Quote
use the OnMouseMove Event if you want to do something when the cursor is
moving over an object.
The OnEnter and OnExit events would be better:
void __fastcall TForm1::EditEnter(TObject *Sender)
{
((TEdit*)Sender)->Color = clRed;
}
void __fastcall TForm1::EditExit(TObject *Sender)
{
((TEdit*)Sender)->Color = clWindow;
}
Gambit
 

Re:TEdit component

Thanks.
"nkyek" < XXXX@XXXXX.COM >, haber iletisinde žunlar?
yazd? XXXX@XXXXX.COM ...
Quote
if cursor in edit1 when paint red.
if cursor in edit2 when paint edit2->red and edit1->old color

"nkyek" < XXXX@XXXXX.COM >, haber iletisinde žunlar?
yazd? XXXX@XXXXX.COM ...
>how I do ?
>if selected the tedit component when paniting bacgroud tihs component.
>
>
>
>