GARANTIR DESCONTO

Fórum Como Pegar o que está selecionado no ShellListView #232264

14/05/2004

0

eu não consigo pegar o item selecionado no ShellListView eu ja tentei de uma porrada de jeito alguem sabe


Leonardobhbr

Leonardobhbr

Responder

Posts

16/07/2004

Jrosivan

Se nao for multi-select, tente assim:

procedure TFormINICIO.BotaoSELECIONAClick(Sender: TObject);
begin
Edit1.Text := ShellList.Folders[ShellList.itemindex].PathName;
end;
(=> já respondido no forum...)

... mas se for multi-select, o melhor é:

procedure TFormINICIO.BotaoSELECIONAClick(Sender: TObject);
var
i: short;
begin
if ShellList.itemindex < 0 then Exit; //(so executa se houver selecao..)
for i := 0 to ShellList.Items.Count - 1 do
begin
if ShellList.Items.Item[i].Selected
then Edit1.Text := EditPath.Text + ShellList.Folders[i].PathName + ´; ´;
end;
end;

.. Espero ter ajudado. :wink:


Responder

Gostei + 0

Utilizamos cookies para fornecer uma melhor experiência para nossos usuários, consulte nossa política de privacidade.

Aceitar