TAdvStringGrid: AddCheckBoxColumn order

Windows 10 x64
TMS Component Pack 8.4.0.0
Delphi Berlin 10.1 update 1

The following doesn't render properly in 0:0 and whenever one clicks the cell, the app crashes:



AdvStringGrid3->MouseActions->CheckAllCheck		= true;
AdvStringGrid3->MouseActions->HotmailRowSelect	= true;
AdvStringGrid3->AddCheckBoxColumn(0);


Moving AddCheckBoxColumn before or after CheckAllCheck fixes the problem, which is interesting, because the following doesn't render a checkbox in 0:0 at all:



AdvStringGrid3->AddCheckBoxColumn(0);
AdvStringGrid3->MouseActions->CheckAllCheck		= true;
//AdvStringGrid3->MouseActions->HotmailRowSelect	= true;


In my opinion the first 3 lines not working is a bug, because I would expect that I first need to set the properties and afterwards exec AddCheckBoxColumn. At least that's how I understand the second 3 lines not working properly: The checkbox in 0:0 isn't rendered because the property is false.

If you set grid.MouseActions.HotmailRowSelect = true, it adds by itself checkboxes to the first column, so there is no need to add checkboxes with grid.AddCheckBoxColumn.

So, to have this checkbox selection functionality, all you need to do is set grid.MouseActions.HotmailRowSelect = true.

I see, thanks. Sounds a bit bit inconsistent to me, because CheckAllCheck doesn't seem to add a checkbox column. How about a check in AddCheckBoxColumn to make it a no-op if HotmailRowSelect is used?


Looking at only code, I wouldn't know/remember easily that HotmailRowSelect adds the checkbox already. Else I wouldn't have started the thread. ;-)

We've added a check for this in AddCheckBoxColumn() in case it is done for column 0 when the HotmailRowSelect is already used. So, in the next update this incorrect use will be automatically avoided.