Hola,
Estoy realizando un instalador en innosetup personalizado..mi problema es que tengo que generar una lista de checkbox y despues al hacer click en un boton seleccionar todos los checbox
*para generar la lista lo eh hecho con TNewCheckListBox
*Asi cree mi lista de checks:
Código Delphi
[-]
Page: TWizardPage;
Button,Buttona, FormButton: TNewButton;
Panel: TPanel;
CheckBox: TCheckBox;
CheckListBox : TNewCheckListBox;
FListaCheckbox:TStrings;
procedure CreateTheWizardPages;
var
Edit: TNewEdit;
PasswordEdit: TPasswordEdit;
listado: TStrings;
i: Integer;
scale : Integer;
scale1:Integer;
j:Integer;
n: integer;
begin
listado := TStringList.Create;
FListaCheckbox := TStringList.Create;
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;
for i := 0 to listado.Count - 1 do
begin
j :=5;
scale :=scale+ (j+15);
CheckListBox := TNewCheckListBox.Create(Page);
CheckListBox.Top := Buttona.Top + Buttona.Height + ScaleY(scale);
CheckListBox.Width := 410;
CheckListBox.Height :=40;
CheckListBox.Flat := True;
CheckListBox.Parent := Page.Surface;
CheckListBox.OnClick:=@uninstaller;
CheckListBox.AddCheckBox(listado[i], '', 0, False, True, True, True, nil);
end;
este tiene un evento uninstaller y cada vez que selecciono un check me tiene que retornar el nombre del checkbox y hacer una serie de pasos:
Asi lo hize:
Código Delphi
[-]
procedure uninstaller(Sender: TObject);
var path: String;
begin
if CheckListBox.Checked
BEGIN
path :=CheckListBox.Items.Strings[0]; MsgBox(path,mbInformation, MB_OK);
end;
end;
***ahora debo de tener un boton de seleccionar todos cuando hago clic selecciono todos los checks
Código Delphi
[-]
procedure ButtonOnClick(Sender: TObject);
var path: String;
begin
end;
Bueno es todo lo que necesito ..gracias por su pronta respuesta