Welcome, Guest
Username: Password: Remember me
CodeTyphon MS Windows (Win7, Win8.x, Win10 and Win11) OS Development, discussions and problems
  • Page:
  • 1

TOPIC:

Label.Color cannot be specified. 2 years 2 months ago #17303

  • Hiroshi Yokota
  • Hiroshi Yokota's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 8
  • Thank you received: 0
It was the same with CT7.8, but the same phenomenon is happening with his CT7.9 this time.
Sorry for the simple thing, but for some reason Label.Color cannot be specified.
For example, in the OnClick event

procedure TForm1.Button1Click(Sender: TObject);
begin
  Label1.Color := clRed;
end;

However, the Label.Color does not change.
Hmmm, this is troublesome.
I wonder why?
Am i crazy?
 

Please Log in or Create an account to join the conversation.

Label.Color cannot be specified. 2 years 2 months ago #17304

  • Hiroshi Yokota
  • Hiroshi Yokota's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 8
  • Thank you received: 0
When CT7.7 it's no problem.
The change is from CT7.8.
 

Please Log in or Create an account to join the conversation.

Label.Color cannot be specified. 2 years 2 months ago #17305

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4535
  • Thank you received: 1114
Just first set TLabel property Transparent := False;

procedure TForm1.FormShow(Sender: TObject);
begin
  Label1.Transparent := False;
  Label1.Color:=clRed;
end;    
  

 
PilotLogic Architect and Core Programmer
Attachments:

Please Log in or Create an account to join the conversation.

Last edit: by Sternas Stefanos.

Label.Color cannot be specified. 2 years 2 months ago #17306

  • Hiroshi Yokota
  • Hiroshi Yokota's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 8
  • Thank you received: 0
Thank you, Stenas Stefanos.
I was dynamically spawning  TLabel instances on my original calendar application.
And there I changed TLabel.Color many times.
Since CT7.8, an accident occurred there, and I was honestly in trouble.
Therefore, I asked a question on this forum, but it was very helpful to receive a clear answer immediately.
I will say it again.
Thank you, Stenas Stefanos.    

Please Log in or Create an account to join the conversation.

  • Page:
  • 1