请问类是与Skype的ListView是怎么做的?谢谢?(100分)

F

fanronghua

Unregistered / Unconfirmed
GUEST, unregistred user!
请问类是与Skype的ListView是怎么做的?谢谢?
 

李翔鹏

Unregistered / Unconfirmed
GUEST, unregistred user!
看不明白阿。
 
F

fanronghua

Unregistered / Unconfirmed
GUEST, unregistred user!
看不明白? 就是Skype 的好友列表啊?
QQ好友列表
 
X

xmcccc

Unregistered / Unconfirmed
GUEST, unregistred user!
QQ 好友列表,不是用LISTVIEW做的 其它的LISTVIEW需要自己继续一个类,重画列头等
 
F

fanronghua

Unregistered / Unconfirmed
GUEST, unregistred user!
但需要改变每个单独的行高
 
S

shangshang

Unregistered / Unconfirmed
GUEST, unregistred user!
推荐 virtualtreeview 虚拟treeview ,可以轻松实现。
 
F

fanronghua

Unregistered / Unconfirmed
GUEST, unregistred user!
Listview 可以改变单行高端吗?
 
F

freeman_m530

Unregistered / Unconfirmed
GUEST, unregistred user!
可以考虑自己生成类似的东西。
我用ScrollBox生成了一个按钮的容器。
procedure TForm1.showresent;
const
leftsi: Integer = 5;
topsi: Integer = 5;
btnwidth: Integer = 80;
btnheight: Integer = 70;
var
bbtt: array of TSpeedButton;
i, j, curleft, curtop, dbtncount: Integer;
mstream: TMemoryStream;
frmComponent: Tcomponent;
begin
LockWindowUpdate(Application.MainFormHandle);
{ 遍历Form组件 }
dbtncount := 0;
for i := 0 to ComponentCount - 1do
begin
 frmComponent := Components;
if (frmComponent is TSpeedButton) then
if ((frmComponent as TSpeedButton).parent = ScrollBox1) then
{ 如果组件为Tlabel型则当作Tlabel处理,以下同 }
 Inc(dbtncount);
end;
SetLength(bbtt, dbtncount);
j := 0;
for i := 0 to ComponentCount - 1do
begin
 frmComponent := Components;
if (frmComponent is TSpeedButton) then
if ((frmComponent as TSpeedButton).parent = ScrollBox1) then
{ 如果组件为Tlabel型则当作Tlabel处理,以下同 }
begin
bbtt[j] := (frmComponent as TSpeedButton);
Inc(j);
end;
end;
for I := 0 to j - 1do
bbtt.Free;
Resentquery.Close;
Resentquery.Open;
SetLength(bbtt, Resentquery.RecordCount);
Resentquery.First;
curleft := leftsi;
curtop := topsi;
i := 0;
while not Resentquery.eofdo
begin
bbtt := TSpeedButton.Create(Self);
bbtt.Parent := ScrollBox1;
bbtt.Layout := blGlyphTop;
bbtt.Width := btnwidth;
bbtt.Height := btnheight;
bbtt.flat := True;
bbtt.Top := curtop;
bbtt.Left := curleft;
bbtt.Hint := Resentquery.FieldByName('filename').AsString;
bbtt.ShowHint := True;
bbtt.name := 'spbtn' + inttostr(i + 1);
bbtt.Caption := Resentquery.FieldByName('name').AsString;
bbtt.OnClick := dynamicbtClick;
bbtt.PopupMenu := resentPopup;
if not Resentquery.FieldByName('ico').IsNull then
begin
mstream := TMemoryStream.Create;
TBlobField(Resentquery.FieldByName('ico')).SaveToStream(mStream);
;
mstream.Position := 0;
bbtt.Glyph.LoadFromStream(mstream);
mstream.Free;
end;
curleft := curleft + leftsi + btnwidth;
if curleft + leftsi + btnwidth > ScrollBox1.Width then
begin
curleft := leftsi;
curtop := curtop + topsi + btnheight;
end;
Inc(i);
Resentquery.Next;
end;
bbtt := nil;
LockWindowUpdate(0);
end;
 
F

fanronghua

Unregistered / Unconfirmed
GUEST, unregistred user!
我先继承一个Listview 或者其他控件来做,但是我想改变每个行的高度,(就是每个行高是不一样),我看大多数空间的行高多是一样的。
 

Similar threads

D
Replies
0
Views
473
DelphiTeacher的专栏
D
D
Replies
0
Views
409
DelphiTeacher的专栏
D
D
Replies
0
Views
280
DelphiTeacher的专栏
D
Top Bottom