paso a descriir mi procedure,
Código Delphi
[-]
procedure TForm1.ListBox1DblClick(Sender: TObject);
begin
Panel6.Visible := False;
Panel7.Visible := True;
if ListBox1.ItemIndex = 0 then
begin
ListBox2.Clear;
ListBox2.Items.LoadFromFile('C:\IPCapitulo.txt');
ListBox3.Items.LoadFromFile('C:\IPArquivo.txt');
ListBox4.Items.LoadFromFile('C:\IPMaximizada.txt');
end;
if ListBox1.ItemIndex = 1 then
begin
ListBox2.Clear;
ListBox2.Items.LoadFromFile('C:\IPCapitulo.txt');
ListBox3.Items.LoadFromFile('C:\IPArquivo.txt');
ListBox4.Items.LoadFromFile('C:\IPMaximizada.txt');
end;
.
.
.
.
.
end;
Código Delphi
[-]
{$WRITEABLECONST ON}
procedure TForm1.SpeedButton2Click(Sender: TObject);
const
i: integer = 0;
begin
with ListBox3.Items do
begin
if ListBox3.ItemIndex < Count-1
then ListBox2.ItemIndex := ListBox2.ItemIndex + 1
else MessageDlg('Você já está no final do curso !',mtInformation,[mbOk],0);
Panel2.Caption := ListBox2.Items.Strings[ListBox2.ItemIndex];
WebBrowser1.Navigate(strings[ListBox2.ItemIndex]);
end;
begin
with ListBox4 do
begin
if i < Count then
if Items[i] = 'N' then
begin
Self.Height := 300;
Self.Width := 550;
Self.Left := 400;
Self.Top := 400;
end;
if Items[i] = 'S' then
begin
Self.Height := 739;
Self.Width := 1024;
Self.Left := 0;
Self.Top := 0;
end;
if i < Count-1 then
inc(i)
else
i:= ListBox4.ItemIndex;
end;
end;
end;
{$WRITEABLECONST OFF}
espero ayude a entender,
gracias
saludos