private void mettreAJourStatusBar() { //Recuperation de l'index du curseur dans tout le document int position = this.richTextBoxAfficherXML.SelectionStart; //Initialisation de la valeur de la colonne int col = 0; //Recuperation de la ligne a laquelle le curseur se trouve //a partir de l'index de celui-ci int lin = this.richTextBoxAfficherXML.GetLineFromCharIndex(position) +1; try { col = position -this.richTextBoxAfficherXML.Text.LastIndexOf(System.Convert.ToChar(10), position - 1) - 1; } catch { col +=1; } //Affichage final this.toolStripStatusLabelNbChar.Text = "| nbchar " + this.richTextBoxAfficherXML.Text.Length.ToString(); this.toolStripStatusLabelLIGNES.Text = "| Ln " + lin; this.toolStripStatusLabelCOLONNES.Text = "Col " + col; this.toolStripStatusLabelSELECTED.Text = "| Sel " + this.richTextBoxAfficherXML.SelectedText.Length; }