Bonjour,
Voila mon probleme:
J'ai créé un listView pour afficher une liste de tache pour l'instant
il ne contient que 2 colonnes. Lorsque je lance le programme et que je
ne rempli pas la listview tout va bien.
Mais quand je le rempli la barre d'ascenseur apparait mais les entetes
de colones disparaissent et je ne vois pas ce qui est affiché. (Cf
ScreenShot http://boiteamadmax.free.fr/bug.png)
voila la declaration (créé par Visual studio)
this.taskList = new System.Windows.Forms.ListView();
this.inputCol = new System.Windows.Forms.ColumnHeader();
this.outputCol = new System.Windows.Forms.ColumnHeader();
this.btAddTask = new System.Windows.Forms.Button();
this.btModTask = new System.Windows.Forms.Button();
this.btDelTask = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// taskList
//
this.taskList.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.taskList.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.inputCol,
this.outputCol});
this.taskList.FullRowSelect = true;
this.taskList.GridLines = true;
this.taskList.ImeMode = System.Windows.Forms.ImeMode.NoControl;
this.taskList.Location = new System.Drawing.Point(8, 8);
this.taskList.Name = "taskList";
this.taskList.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.taskList.Size = new System.Drawing.Size(616, 256);
this.taskList.TabIndex = 0;
this.taskList.View = System.Windows.Forms.View.Details;
//
// inputCol
//
this.inputCol.Text = "Entrée";
this.inputCol.Width = 200;
//
// outputCol
//
this.outputCol.Text = "Sortie";
this.outputCol.Width = 200;
et voici le code qui rempli le listView
private void UpdateTaskList()
{
taskList.Clear();
foreach(Task t in th.tasks)
{
string[] line = {t.input,t.output};
ListViewItem lvi = new ListViewItem(line);
taskList.Items.Add(lvi);
}
th.SaveToFile(Application.StartupPath + "\\default.tsk");
}
En me baladant sur ce forum j'ai vu d'autre formes que j'ai essayé mais bon en gros voila le style des formes que j'ai essayé
http://www.csharp.fr/forum.v2.aspx?id=265733
http://www.csharp.fr/forum.v2.aspx?id=110086
Et ca fait toujours pareil.
D'avance Merci a celui qui me repondra.
>Madmax, Parce que le Java c'est bien :p