Home   Artículos   Recursos   Foros   
Artíclos recientes publicados en Latindevelopers:

Visual C++: NSDoubleEdit: Un control para el manejo de números decimales en Visual C++.
Visual C++: Implementando una Calculadora en Visual C++
Visual C++: CCommandLine: Una clase para el uso de la linea de comando
Visual C++: Una clase para el manejo del Registro


filas selecionadas en stringgrid

Foro sobre popular lenguaje de Borland y el lenguaje pascal.

Moderador: yalmar

filas selecionadas en stringgrid

Notapor cojones el Mié Feb 14, 2007 1:22 pm

Necesito saber cuales filas de un Stringgrid estan selecionadas.
La idea es poder eliminar las filas selecionadas por el usuario.
Por mas q e buscado no e encontrado ningun metodo q me permita averiguar cuales estan selecionadas. algien me puede ayudar?.
gracias
cojones
Novato
Novato
 
Mensajes: 1
Registrado: Mié Feb 14, 2007 1:20 pm

Re: filas selecionadas en stringgrid

Notapor yalmar el Dom Feb 18, 2007 1:26 pm

Hola,

aqui una forma de hacerlo


Código: Seleccionar todo
     //get the coordinates of the selected region of the grid
      LeftCell := StringGrid1.Selection.Left;
      TopCell := StringGrid1.Selection.Top;
      BottomCell := StringGrid1.Selection.Bottom;
      RightCell := StringGrid1.Selection.Right;
      //The variable TextBuf is used to hold the information that will to to the clipboard
      TextBuf := '';
      //for all of the selected cells, copy the contents to
      //TextBuf and separate lines by returns and cells by tabs
      for i := TopCell to BottomCell do begin
         for j := LeftCell to RightCell do begin
           // here insert the code to remove the selected rows from the stringgrid
         end;
      end;


salu2
Avatar de Usuario
yalmar
Programador
Programador
 
Mensajes: 240
Registrado: Mié Jun 09, 2004 4:13 pm
Ubicación: Brasil


Volver a Delphi

¿Quién está conectado?

Usuarios navegando por este Foro: Yahoo [Bot] y 0 invitados