el_teedee
Messages postés
497
Date d'inscription
mercredi 7 juillet 2004
Statut
Membre
Dernière intervention
13 juillet 2015
9
1 sept. 2005 à 11:13
Lut,
bon, je me suis pas fait chier, j'ai repris ma form depuis mon projet
précédent (heureusement, je l'avais sauvegardée dans un état "ok")
Mais là, je rencontre un nouveau problème. Dans le concepteur de form,
j'ai mis certains label en rouge (précisément, ceux qui sont dans les
groupbox). Lorsque ma form se load, les label n'ont pas la couleur que
j'ai assignée !
Je me demande si l'ordre de déclaration et de définition des control
n'a pas été modifié. Par exemple, si le label1 en rouge qui sera ajouté
dans le groupbox1 disons, doit être défini juste avant ou juste après
le groupbox, et donc le groupbox.add(label1).
C'est à n'y rien comprendre.
Voilà le code en question, si vous voyez qqch qui cloche :
private void InitializeComponent()
{
System.Resources.ResourceManager resources = new
System.Resources.ResourceManager(typeof(Form_Telechargement));
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.label1 = new System.Windows.Forms.Label();
this.pB_telechargement_general = new System.Windows.Forms.ProgressBar();
this.label10 = new System.Windows.Forms.Label();
this.label_general = new System.Windows.Forms.Label();
this.gB_etape3 = new System.Windows.Forms.GroupBox();
this.label6 = new System.Windows.Forms.Label();
this.label7 = new System.Windows.Forms.Label();
this.pB_Creation_fichier_csv_en_cours = new
System.Windows.Forms.ProgressBar();
this.label8 = new System.Windows.Forms.Label();
this.label_33 = new System.Windows.Forms.Label();
this.gB_etape1 = new System.Windows.Forms.GroupBox();
this.label_13 = new System.Windows.Forms.Label();
this.label_etape1 = new System.Windows.Forms.Label();
this.gB_etape2 = new System.Windows.Forms.GroupBox();
this.label4 = new System.Windows.Forms.Label();
this.label_etape2_nom_fichier = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label_23 = new System.Windows.Forms.Label();
this.pB_telechargement_fichier_en_cours = new
System.Windows.Forms.ProgressBar();
this.label5 = new System.Windows.Forms.Label();
this.groupBox1.SuspendLayout();
this.gB_etape3.SuspendLayout();
this.gB_etape1.SuspendLayout();
this.gB_etape2.SuspendLayout();
this.SuspendLayout();
//
// groupBox1
//
this.groupBox1.Controls.Add(this.label1);
this.groupBox1.Controls.Add(this.pB_telechargement_general);
this.groupBox1.Controls.Add(this.label10);
this.groupBox1.Controls.Add(this.label_general);
this.groupBox1.ForeColor = System.Drawing.SystemColors.ControlText;
this.groupBox1.Location = new System.Drawing.Point(8, 240);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(448, 48);
this.groupBox1.TabIndex = 19;
this.groupBox1.TabStop = false;
//
// label1
//
this.label1.Location = new System.Drawing.Point(160, 16);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(32, 23);
this.label1.TabIndex = 8;
this.label1.Text = "0 %";
//
// pB_telechargement_general
//
this.pB_telechargement_general.Location = new System.Drawing.Point(192,
16);
this.pB_telechargement_general.Name = "pB_telechargement_general";
this.pB_telechargement_general.Size = new System.Drawing.Size(192, 16);
this.pB_telechargement_general.TabIndex = 7;
//
// label10
//
this.label10.Location = new System.Drawing.Point(392, 16);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(48, 23);
this.label10.TabIndex = 9;
this.label10.Text = "100 %";
//
// label_general
//
this.label_general.Font = new System.Drawing.Font("Microsoft Sans
Serif", 9F, System.Drawing.FontStyle.Regular,
System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.label_general.Location = new System.Drawing.Point(8, 16);
this.label_general.Name = "label_general";
this.label_general.Size = new System.Drawing.Size(152, 24);
this.label_general.TabIndex = 3;
this.label_general.Text = "Avancement général";
//
// gB_etape3
//
this.gB_etape3.Controls.Add(this.label6);
this.gB_etape3.Controls.Add(this.label7);
this.gB_etape3.Controls.Add(this.pB_Creation_fichier_csv_en_cours);
this.gB_etape3.Controls.Add(this.label8);
this.gB_etape3.Controls.Add(this.label_33);
this.gB_etape3.ForeColor = System.Drawing.SystemColors.ControlText;
this.gB_etape3.Location = new System.Drawing.Point(8, 160);
this.gB_etape3.Name = "gB_etape3";
this.gB_etape3.Size = new System.Drawing.Size(448, 72);
this.gB_etape3.TabIndex = 18;
this.gB_etape3.TabStop = false;
//
// label6
//
this.label6.Location = new System.Drawing.Point(392, 40);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(48, 23);
this.label6.TabIndex = 11;
this.label6.Text = "100 %";
//
// label7
//
this.label7.Location = new System.Drawing.Point(128, 40);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(32, 23);
this.label7.TabIndex = 10;
this.label7.Text = "0 %";
//
// pB_Creation_fichier_csv_en_cours
//
this.pB_Creation_fichier_csv_en_cours.Location = new
System.Drawing.Point(160, 40);
this.pB_Creation_fichier_csv_en_cours.Name =
"pB_Creation_fichier_csv_en_cours";
this.pB_Creation_fichier_csv_en_cours.Size = new
System.Drawing.Size(224, 16);
this.pB_Creation_fichier_csv_en_cours.TabIndex = 9;
//
// label8
//
this.label8.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F,
System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point,
((System.Byte)(0)));
this.label8.Location = new System.Drawing.Point(192, 16);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(176, 24);
this.label8.TabIndex = 8;
this.label8.Text = "Création du fichier (.csv)";
//
// label_33
//
this.label_33.Font = new System.Drawing.Font("Arial Black", 12F,
System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point,
((System.Byte)(0)));
this.label_33.ForeColor = System.Drawing.Color.Red;
this.label_33.Location = new System.Drawing.Point(8, 32);
this.label_33.Name = "label_33";
this.label_33.Size = new System.Drawing.Size(112, 32);
this.label_33.TabIndex = 7;
this.label_33.Text = "Etape 3/3";
//
// label_13
//
this.label_13.Font = new System.Drawing.Font("Arial Black", 12F,
System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point,
((System.Byte)(0)));
this.label_13.ForeColor = System.Drawing.Color.Blue;
this.label_13.Location = new System.Drawing.Point(8, 24);
this.label_13.Name = "label_13";
this.label_13.Size = new System.Drawing.Size(120, 32);
this.label_13.TabIndex = 2;
this.label_13.Text = "Etape 1/3";
//
// gB_etape1
//
this.gB_etape1.Controls.Add(this.label_13);
this.gB_etape1.Controls.Add(this.label_etape1);
this.gB_etape1.ForeColor = System.Drawing.SystemColors.ControlText;
this.gB_etape1.Location = new System.Drawing.Point(8, 8);
this.gB_etape1.Name = "gB_etape1";
this.gB_etape1.Size = new System.Drawing.Size(448, 64);
this.gB_etape1.TabIndex = 16;
this.gB_etape1.TabStop = false;
//
// label_etape1
//
this.label_etape1.Font = new System.Drawing.Font("Microsoft Sans
Serif", 9F, System.Drawing.FontStyle.Regular,
System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.label_etape1.Location = new System.Drawing.Point(128, 32);
this.label_etape1.Name = "label_etape1";
this.label_etape1.Size = new System.Drawing.Size(312, 24);
this.label_etape1.TabIndex = 3;
this.label_etape1.Text = "Patientez... Initialisation du boîtier en
cours...";
//
// gB_etape2
//
this.gB_etape2.Controls.Add(this.label4);
this.gB_etape2.Controls.Add(this.label_etape2_nom_fichier);
this.gB_etape2.Controls.Add(this.label2);
this.gB_etape2.Controls.Add(this.label_23);
this.gB_etape2.Controls.Add(this.pB_telechargement_fichier_en_cours);
this.gB_etape2.Controls.Add(this.label5);
this.gB_etape2.ForeColor = System.Drawing.SystemColors.ControlText;
this.gB_etape2.Location = new System.Drawing.Point(8, 80);
this.gB_etape2.Name = "gB_etape2";
this.gB_etape2.Size = new System.Drawing.Size(448, 72);
this.gB_etape2.TabIndex = 17;
this.gB_etape2.TabStop = false;
//
// label4
//
this.label4.Location = new System.Drawing.Point(128, 40);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(32, 23);
this.label4.TabIndex = 5;
this.label4.Text = "0 %";
//
// label_etape2_nom_fichier
//
this.label_etape2_nom_fichier.Font = new System.Drawing.Font("Microsoft
Sans Serif", 9F, System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.label_etape2_nom_fichier.ForeColor = System.Drawing.Color.Red;
this.label_etape2_nom_fichier.Location = new System.Drawing.Point(312,
16);
this.label_etape2_nom_fichier.Name = "label_etape2_nom_fichier";
this.label_etape2_nom_fichier.Size = new System.Drawing.Size(136, 24);
this.label_etape2_nom_fichier.TabIndex = 7;
this.label_etape2_nom_fichier.Text = "fichier "x"";
//
// label2
//
this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F,
System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point,
((System.Byte)(0)));
this.label2.Location = new System.Drawing.Point(160, 16);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(144, 24);
this.label2.TabIndex = 3;
this.label2.Text = "Transfert du fichier :";
//
// label_23
//
this.label_23.Font = new System.Drawing.Font("Arial Black", 12F,
System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point,
((System.Byte)(0)));
this.label_23.ForeColor = System.Drawing.Color.Red;
this.label_23.Location = new System.Drawing.Point(8, 32);
this.label_23.Name = "label_23";
this.label_23.Size = new System.Drawing.Size(120, 32);
this.label_23.TabIndex = 2;
this.label_23.Text = "Etape 2/3";
//
// pB_telechargement_fichier_en_cours
//
this.pB_telechargement_fichier_en_cours.Location = new
System.Drawing.Point(160, 40);
this.pB_telechargement_fichier_en_cours.Name =
"pB_telechargement_fichier_en_cours";
this.pB_telechargement_fichier_en_cours.Size = new
System.Drawing.Size(224, 16);
this.pB_telechargement_fichier_en_cours.TabIndex = 4;
//
// label5
//
this.label5.Location = new System.Drawing.Point(392, 40);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(48, 23);
this.label5.TabIndex = 6;
this.label5.Text = "100 %";
//
// Form_Telechargement
//
this.AutoScaleBaseSize = new System.Drawing.Size(6, 15);
this.ClientSize = new System.Drawing.Size(464, 296);
this.Controls.Add(this.groupBox1);
this.Controls.Add(this.gB_etape3);
this.Controls.Add(this.gB_etape1);
this.Controls.Add(this.gB_etape2);
this.Enabled = false;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "Form_Telechargement";
this.Text = "Téléchargement des fichiers";
this.groupBox1.ResumeLayout(false);
this.gB_etape3.ResumeLayout(false);
this.gB_etape1.ResumeLayout(false);
this.gB_etape2.ResumeLayout(false);
this.ResumeLayout(false);
}
En l'occurence, ce sont les label que j'ai mis en rouge qui ne
prennent pas la couleur que je veux. Cela ne viendrait pas du fait que
le textcolor du groupbox en question est déclaré après, et donc il
"écrase" les couleurs des labels ?