Setting a listbox's ItemIndex to zero selects the first item (provided there is a first item).
Try this little example. In a new empty project replace the main form unit's code with the following, compile and run.
Perhaps it will help you to figure out what is amiss with your code.
unit Unit1;
{$mode objfpc}{$H+}
interface
uses
Classes, Forms, StdCtrls, ExtCtrls;
type
{ TForm1 }
TForm1 = class(TForm)
procedure FormCreate(Sender: TObject);
private
lb: TListBox;
rg: TRadioGroup;
procedure RGClick(Sender: TObject);
end;
var
Form1: TForm1;
implementation
{$R *.lfm}
{ TForm1 }
procedure TForm1.FormCreate(Sender: TObject);
begin
Width:=380;
Height:=140;
lb:=TListBox.Create(Self);
lb.SetBounds(10, 10, 80, 120);
lb.Items.CommaText:='one,two,three';
lb.Parent:=Self;
rg:=TRadioGroup.Create(Self);
rg.SetBounds(100, 10, 270, 120);
rg.Items.CommaText:='-1,0,1,2';
rg.Caption:='Click to select corresponding listbox ItemIndex';
rg.OnClick:=@RGClick;
rg.Parent:=Self;
end;
procedure TForm1.RGClick(Sender: TObject);
begin
lb.ItemIndex:=rg.ItemIndex - 1;
end;
end.