Hi Alexander,
Sure thing I used Google quite extensively before posting my question

After muddling through I managed to create a workable solution which I will post for anyone whos is in need of such. (elsewhere on the forum someone had the same sorting problems regarding a different component)
In the form declarations
above the
private part of the form declaration I added the declaration of my comparison function :
- Code: Select all
function Comparison(Left, Right : TCollectionItem; var Data) : integer;
private
This function itself is quite simple and sorts my items by the caption of the items :
- Code: Select all
function TTestForm.Comparison(Left, Right : TCollectionItem; var Data) : integer;
begin
Result := comparestr(TIWCGJQCheckBoxItem(Left).Caption,TIWCGJQCheckBoxItem(Right).Caption);
end;
And when I want to sort the list of items of my CheckBoxList I just use the following line :
- Code: Select all
TestCheckBoxList.Items.SortItems(Comparison);
Best regards.