Skip to content
View in the app

A better way to browse. Learn more.

MSFN

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[How to] Checkbox :: Select one at a time

Featured Replies

This is the code section from inno setup.My intention is to make two Checkbox where at a time one is being selected.

But this code return error when first checkbox is clicked.

 section: 
[Code]
var
Box2,CheckBox: TCheckBox; //Yes global variable.

procedure CheckBoxOnClick(Sender: TObject);
begin
if Checkbox.Checked then //generate error
BEGIN
CheckBox.State := cbUnchecked;
Box2.State := cbChecked;
END else
BEGIN
CheckBox.State := cbChecked;
Box2.State := cbUnchecked;
END;
end;

procedure Box2OnClick(Sender: TObject);
begin
if Box2.Checked then //generate error
BEGIN
CheckBox.State := cbChecked;
Box2.State := cbUnchecked;
END else
BEGIN
CheckBox.State := cbUnchecked;
Box2.State := cbChecked;
END;
end;

procedure CreateTheWizardPages;
var
Page: TWizardPage;
begin
Page := CreateCustomPage(wpWelcome, 'Support Us', 'If you like this package ,then please support us.');

CheckBox := TCheckBox.Create(Page);
CheckBox.Top :=ScaleY(8)+ScaleX(50);
CheckBox.Width := Page.SurfaceWidth;
CheckBox.Height := ScaleY(17);
CheckBox.Caption := 'Do this';
CheckBox.Checked := True;
CheckBox.OnClick := @CheckBoxOnClick;
CheckBox.Parent := Page.Surface;

Box2 := TCheckBox.Create(Page);
Box2.Top :=ScaleY(8)+ScaleX(70);
Box2.Width := Page.SurfaceWidth;
Box2.Height := ScaleY(17);
Box2.Caption := 'No,Thanks.';
Box2.Checked := False;
Box2.OnClick := @Box2OnClick;
{ }
Box2.Parent := Page.Surface;
end;



procedure InitializeWizard();
begin
{ Custom wizard pages }
CreateTheWizardPages;
end;

Returns an error on firstbox click named:

Access violation at address 00444400. Write of address 011ABFF8.

Please tell me where to change..

Edited by enlighten

Please sign in to comment

You will be able to leave a comment after signing in

Sign In Now

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.