Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: CBXE8 - EListError while changing TLabel FontColor ?


This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 2 - Last Post: Oct 8, 2015 8:18 PM Last Post By: GAI CHEW KAI
GAI CHEW KAI

Posts: 117
Registered: 7/25/14
CBXE8 - EListError while changing TLabel FontColor ?  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 6, 2015 7:43 PM
Embarcadero® C++Builder XE8 Version 22.0.19027.8951 and Indy 10.
Window 10 Pro x64
Android 4.1.2

QUESTIONS

1. I try to change a font color via implementations below:

METHOD 1:

void TfMain::__txt (__in UnicodeString us)
{
// lbTabMsg.....is TLabel
lbTabMsg->TextSettings->FontColor = TAlphaColor( claGreen );
lbTabMsg->Text = us;
}

void TfMain::__err (__in UnicodeString us)
{
lbTabMsg->TextSettings->FontColor = TAlphaColor( claRed );
lbTabMsg->Text = us;
}

or

METHOD 2:

// lbGreen.....another TLabel created design time with other text color.
TextSettings->FontColor = lbGreen->TextSettings->FontColor;

Both methods resulted in exception error below:

Project XXX.apk raised exception class EListError with message 'Duplicates not allowed'

Please advise.
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: CBXE8 - Change of text color via TextSettings->FontColor failed ?  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 7, 2015 9:52 AM   in response to: GAI CHEW KAI in response to: GAI CHEW KAI
GAI wrote:

lbTabMsg->TextSettings->FontColor = TAlphaColor( claGreen );
<snip>
*Project XXX.apk raised exception class EListError with message
'Duplicates not allowed'*

Do you have the same problem if you use the TLabel::FontColor property instead?

lbTabMsg->FontColor = ...;


--
Remy Lebeau (TeamB)
GAI CHEW KAI

Posts: 117
Registered: 7/25/14
Re: CBXE8 - Change of text color via TextSettings->FontColor failed ?  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 8, 2015 4:58 AM   in response to: Remy Lebeau (Te... in response to: Remy Lebeau (Te...
Do you have the same problem if you use the TLabel::FontColor property instead?
- Yes, same problem, already tested.
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02