Bonjour à tous.
Le label1 n'affiche pas sa couleur mais celle de son parent Panel1, pourquoi ?
j'ai simplifié au maximum le programme ainsi que la fiche tout en conservant l'anomalie.
Je ne compte pas contourner le problème en créant un 2ème panel à la place du label1,
ni jongler avec les paint, invalidate et autres.
Je veux juste vérifier si ce problème est reproductible sur une autre machine, ou s'il y a une explication.
Merci
Le source du programme :
Le fichier dfm :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27 unit UDynObj; interface uses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.ExtCtrls, Vcl.StdCtrls; type TFDynObj = class(TForm) Panel1: TPanel; Label1: TLabel; private { Déclarations privées } public { Déclarations publiques } end; var FDynObj: TFDynObj; implementation {$R *.dfm} end.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34 object FDynObj: TFDynObj Left = 0 Top = 0 Caption = 'FDynObj' ClientHeight = 441 ClientWidth = 624 Color = clChartreuse Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText Font.Height = -12 Font.Name = 'Segoe UI' Font.Style = [] TextHeight = 15 object Panel1: TPanel Left = 16 Top = 32 Width = 521 Height = 41 Caption = 'Panel1' Color = clFuchsia ParentBackground = False TabOrder = 0 object Label1: TLabel Left = 112 Top = 16 Width = 34 Height = 15 Caption = 'Label1' Color = clWhite ParentColor = False end end end
Partager