Recent

Author Topic: CheckBox on Android does not recognize checked  (Read 4824 times)

polypress

  • Jr. Member
  • **
  • Posts: 91
CheckBox on Android does not recognize checked
« on: September 09, 2013, 10:01:45 am »
When using checkboxes on android, the code does not recognize the checked state, whether checked in Object Inspector or checked while running,
For example :-

    if not CheckBox2.Checked then
    begin
    Seek(F1, startHeader[StrToInt(trim(Edit2.Text))]);
    pp := indexHeader[StrToInt(trim(Edit2.Text))];
    Seek(F2, startSplits[StrToInt(trim(Edit2.Text))]);
    vv:=1000*StrToInt(trim(Edit2.Text))-1;
    end else begin pp := 1; vv:=0; end;

or

if CheckBox2.Checked then AlStringGrid1.RowCount:=AlStringGrid1.RowCount+maxvv else AlStringGrid1.RowCount := AlStringGrid1.RowCount+1000;

WidgetSet=customdrawn
programming OS is WinXP
target OS is Android

Regards

Bart

  • Hero Member
  • *****
  • Posts: 5662
    • Bart en Mariska's Webstek
Re: CheckBox on Android does not recognize checked
« Reply #1 on: September 09, 2013, 12:14:21 pm »
Please provide a minimal testcase: e.g. a form with 1 checkbox and 1 button.
In buttons OnClick do something like:
Code: [Select]
  if CheckBox1.Checked then
    ShowMessage('CheckBox IS Checked)
  else
    ShowMessage('CheckBox is NOT Checked);

Check CheckBox, click Button.
UnCheck CheckBox, click Button.

If this does not work as expected then
  • If your Lazarus is a release version (currently 1.0.12), try trunk (or daily snapshot)
  • If you used trunk (or snapshot) and problem still exists:
  • Report issue in bugtracker
  • Mention Lazarus version, revision, OS (+ OS version), widgetset, FPC version
  • Attach minimal testcase example (as described above), so whomever tries to fix it doesn't have to build a sample application him/herself.

Bart

polypress

  • Jr. Member
  • **
  • Posts: 91
Re: CheckBox on Android does not recognize checked
« Reply #2 on: September 10, 2013, 06:29:30 am »
Sorry. Straight forward example :-

procedure TForm1.Button1Click(Sender: TObject);
begin
if not CheckBox2.Checked then
    ShowMessage('CheckBox2  is NOT checked') else
    ShowMessage('CheckBox2  is checked');
end;

This shows 'CheckBox2  is NOT checked' whether checked or not.

Lazarus 1.1-41139 FPC 2.7.1
I think this is the latest version of Lazarus/FPC
Downloaded 19/08/2013

WidgetSet=customdrawn
programming OS is WinXP (SP3)
target OS is Android

Regards


Bart

  • Hero Member
  • *****
  • Posts: 5662
    • Bart en Mariska's Webstek
Re: CheckBox on Android does not recognize checked
« Reply #3 on: September 10, 2013, 12:02:38 pm »
So, please then report in butrackes as I requested.
Bugs reported in the forum will be forgotten, bugs in the bugtracker will not.

Bart

 

TinyPortal © 2005-2018