bonjour,

j'ai une stringgrid pour laquelle je voudrais faire varier l Option goEditing selon la colonne concernée

Voici mon code:
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
 
void __fastcall TForm_ppale::StringGrid_gpmiSelectCell(TObject *Sender,
      int ACol, int ARow, bool &CanSelect)
{
  colonne=ACol;
  ligne=ARow;
  select=true;
}
//-------------------------------------------------------------------------
 
 
void __fastcall TForm_ppale::StringGrid_gpmiClick(TObject *Sender)
{
  if (colonne==0){
    StringGrid_gpmi->Options= TGridOptions() <<goFixedHorzLine ,goFixedVertLine ,goHorzLine ,goVertLine;
  }
  if (colonne==1){
    StringGrid_gpmi->Options= TGridOptions() <<goFixedHorzLine ,goFixedVertLine ,goHorzLine ,goVertLine ,goEditing;
  }
  StringGrid_gpmi->Repaint();
  select=false;
 
}
Le probleme c'est que dans tous les cas mes traits de ligne et colonnes disparaissent et le goEditing se met a false et ne repasse plus jamais a true

merci de votre aide.