Delphi - Como uso el CheckListBox

 
Vista:

Como uso el CheckListBox

Publicado por *** MS *** (42 intervenciones) el 11/08/2007 17:13:16
Dios les Bendiga

Necesito saber cómo puedo seleccionar múltiples opciones con el CheckListBox, y que las opciones que seleccioné, me las coloque separada por comas en un Edit.

GRACIAS POR TU AYUDA
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

RE:Como uso el CheckListBox

Publicado por Richard (59 intervenciones) el 13/08/2007 04:07:26
Okas..

Mira en el evento OnClickCheck, del checkListBox, escribe lo siguiente..

procedure TForm1.CheckListBox1ClickCheck(Sender: TObject);
var
Elemento : Integer;

begin

Edit1.Text:='';

FOR Elemento:=0 TO CheckListBox1.Items.Count - 1 DO
BEGIN
IF CheckListBox1.Checked[Elemento] THEN
Edit1.Text:=Edit1.Text + CheckListBox1.Items.Strings[Elemento] +',';
END;

IF Copy(Trim(Edit1.Text),Length(Edit1.Text),1)=',' THEN
Edit1.Text:=Copy(Trim(Edit1.Text),1,Length(Edit1.Text)-1);

end;

Espero que te sirva, responde si solucionas tu problemita, hasta pronto..
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

RE:Como uso el CheckListBox

Publicado por *** MS *** (42 intervenciones) el 20/08/2007 01:49:09
SI GRACIAS, MUCHAS GRACIAS,

AHORA NECESITO SABER LO SIGUIENTE...
TENGO UNA TABLA CON DOS CAMPOS, UNO SE LLAMA CODIGO, Y OTRA PRECIO. QUIERO SABER COMO HAGO LA SUMA DE TODOS LOS REGISTROS DEL CAMPO PRECIO, YA QUE HAY MUCHOS VALORES NUMERICOS EN LOS REGISTROS Y QUIERO QUE ME APAREZCA EL VALOR DE LA SUMA DE TODOS ESOS REGISTROS DEL CAMPO (PRECIO), Y QUIERO MOSTRARLOS CON UN MESSAGEBOX.
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar