Jump to content

TW3CheckBox appearing double

Recommended Posts

Hi, when using TW3Checkbox the actual box itself seems to render twice, am i doing something wrong?

This is the code i'm using to generate the boxes:

  EnglishCheckBox := TW3CheckBox.Create(fPanel);
  EnglishCheckBox.Caption := 'English Assessment';
  EnglishCheckBox.Checked := false;

  MathCheckBox := TW3CHeckBox.Create(fPanel);
  MathCheckBox.Caption := 'Math Assessment';
  MathCheckBox.Checked := false;


Which results in this:



Note: "Perc" is a simple function that returns an integer.

Link to post
Share on other sites
  • Moderators

I'm a bit confused


There is an issue with TW3CheckBox




which prevents rendering any checkmarks until the '-webkit-appearance: none' line from the css is deleted


I cannot reproduce your issue with double checkbox renderings though


which version are you on ?

Link to post
Share on other sites

Had a look through the RTL's code: 

{ **************************************************************************** }
{ TW3CheckBox                                                                  }
{ **************************************************************************** }

procedure TW3CheckBox.InitializeObject;
  FLabel := TW3CheckBoxLabel.Create(Self);
  FMark := TW3CheckMark.Create(Self);

  FLabel.Font.Color := clBlack;
  FLabel.Caption := 'Checkbox';
  //FLabel.Container.OnClick := HandleLabelClick;
  FLabel.OnClick := HandleLabelClick;

  FMark := TW3CheckMark.Create(Self);


The FMark CheckMark object gets created twice, commenting out one of them removes the issue.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...