Asi creo mi control de checkbolist..el codigo es para un instalador inno setup y innosetup utiliza el pascal que es parecido al delphi bueno es lo que segun investigue
Código Delphi
[-]
[code]
var
Page: TWizardPage;
Buttona TNewButton;
CheckListBox1: TNewCheckListBox;
procedure uninstaller(Sender: TObject);
begin
MsgBox('Indice item actual: '+IntToStr(Integer(CheckListBox1.ItemIndex)),mbInformation, MB_OK);
end;
procedure CreateTheWizardPages;
var
Edit: TNewEdit;
PasswordEdit: TPasswordEdit;
listado: TStrings;
inicio: Integer;
scale : Integer;
scale1:Integer;
j:Integer;
n: integer;
begin
Page := CreateCustomPage(wpSelectDir, 'Custom wizard page controls', 'TButton and others');
Buttona := TNewButton.Create(Page);
Buttona.Width := ScaleX(75);
Buttona.Height := ScaleY(23);
Buttona.Caption := 'TNewButton';
Buttona.Parent := Page.Surface;
Buttona.Visible := true;
Buttona.OnClick := @ButtonOnClick;
scale :=8;
for inicio:= 1 to 10 do
begin
CheckListBox1 := TNewCheckListBox.Create(Page);
j :=5;
scale :=scale+ (j+15);
CheckListBox1 := TNewCheckListBox.Create(Page); CheckListBox1.Top := Buttona.Top + Buttona.Height + ScaleY(scale);
CheckListBox1.Width := 410;
CheckListBox1.Height :=40;
CheckListBox1.Parent := Page.Surface;
CheckListBox1.OnClick:=@uninstaller;
CheckListBox1.AddCheckBox('Item'+IntToStr(inicio), 'qwqw', 0, False, True, True, True, nil);
end;
end;
ya eh probado el codigo que usted me mando..y lo eh hecho asi como esta arriba..aun asi me bota el index -1..gracias por su pronta respuesta...En el codigo que me envio hay eventos asi 'TForm1.FormCreate' en inno setup no se genera estos eventos .