Einzelnen Beitrag anzeigen

Benutzerbild von LoCrux
LoCrux

Registriert seit: 5. Mär 2007
Ort: Gwang-Yang-City
48 Beiträge
 
Delphi 2009 Enterprise
 
#2

AW: D2009 : TListView -> Groups -> State lässt sich nicht ändern

  Alt 14. Aug 2014, 17:03
Solved!!!

Delphi-Quellcode:
procedure ListViewCE(lv:TJVListView;Collapsed:boolean);
var
  id : Integer;
  res : Integer;
  h : HWND;
  col : integer;
begin
 h := lv.Handle;
 if (h = 0) then exit;
 for id := 0 to lv.Groups.Count-1
 do begin
   if Boolean(ListView_HasGroup(h,id))
   then begin
     if Collapsed then col := 1 else col := 4;
     res := ListView_SetGroupState(h,id,LVGS_COLLAPSED,col);
   end;
 end;
 Application.ProcessMessages;
end;
“C++ is an insult to the human brain.” [Niklaus Wirth]

2B OR NOT 2B (.. THAT IS FF)
  Mit Zitat antworten Zitat