Ver Mensaje Individual
  #8  
Antiguo 17-05-2010
Chewitta Chewitta is offline
Miembro
 
Registrado: jul 2008
Posts: 13
Reputación: 0
Chewitta Va por buen camino
Unhappy Seleccionar nietos en TreeView

Hola !!


Tengo este codigo y me funciona solamente con los hijo en un treeview,ya lo que quiero que darle en el padre quitar el check de todos los hijos y nietos...

procedure TFrmSeguridad.TreeView1MouseDown(Sender: TObject;
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
var node_sel,f:TTreeNode;
p:tpoint;
b:boolean;
begin
getcursorpos(p);
if (TreeView1.GetNodeAt(X, Y) <> nil) then
begin
node_sel:=TreeView1.GetNodeAt(x,y);
b:=TreeView1.GetChecked(node_sel);
f:=node_sel.getFirstChild;
while (f<>nil) do
begin
TreeView1.SetChecked(f,b);
f:=f.GetNextChild(f);
end;
end;
end;



de antemano agreadezco su ayuda...
Responder Con Cita