This forum is temporaily read-only. All existing discussions remain available for reference. For new questions, bug reports or support requests, please contact us at mail@lmdsupport.com.

TElXTree, ThemeMode = ttmNone, Checked TElXCellCheckbox, enabled := false, in cell shows unchecked

edited May 2018 in LMD ElPack
Hi,

When I have a cell with a checked TElXCellCheckbox cell control, and TElXCellCheckbox.Enabled := false,  then it shows checked when the TElXTree.ThemeMode is ttmNative or ttmPlatform, but unchecked if it is ttmNone.
Is it designed that way, or is it a bug?

Regards,
Louis

Comments

  • edited May 2018
    Deleted.
  • Hi Eugene. Where is it fixed?
  • Add a ElXTree1: TElXTree to a form.

    In object inspector, add one header section, and then one item, and set ElXTree1.ThemeMode to ttmNone.

    Add for OnCreate event handler:

    procedure TForm1.FormCreate(Sender: TObject);
    begin
      ElXTree1.Items[0].Cells[0].UseOwnStyle := true;
      ElXTree1.Items[0].Cells[0].Style.Control := TElXCellCheckbox.Create;
      (ElXTree1.Items[0].Cells[0].Style.Control as  TElXCellCheckbox).Checked := true;
      (ElXTree1.Items[0].Cells[0].Style.Control as  TElXCellCheckbox).Enabled := false;
      ElXTree1.ThemeMode := ttmNone;
    end;

    When you run it, you will find the cell unchecked.
    If ElXTree1.ThemeMode :is changed from ttmNone to either ttmPlatform or ttmNative, the cell is shown as checked. This is only if the TElXCellCheckbox cell control is disabled. 
  • I've fixed the bug today. New code will be generally available with the next service release. Also, if you have access to LMD GIT you can update sources right now. 
  • Hi,

    Thanks Eugene. I did manage to download source before, but I can't find a link to it anymore, and I forgot what the link was?


Sign In or Register to comment.