I have a slight problem. When I select the appropriate course, the text in the label, displaying the course rating, would cut the first character off.
Pretoria becomes retoria, Centurion --> enturion etc
Any help ??
private
{ Private declarations }
procedure ShowRating (Index: integer; out CourseName, CourseRating: string);
implementation
{$R *.dfm}
procedure TfrmMyGolf.rgbCoursesClick(Sender: TObject);
var
CourseRating: string;
begin
// Change Label in Course rating
ShowRating (frmMyGolf.rgbCourses.ItemIndex, CourseName, CourseRating) ;
lblCourseRating.Caption := 'Rating for ' +CourseName+ ' is ' +CourseRating ;
end;
procedure TfrmMyGolf.ShowRating (Index: integer; out CourseName, CourseRating: string);
begin
CourseName := frmMyGolf.rgbCourses.Items.ValueFromIndex[Index];
CourseRating := IntToStr(Ratings[Index]);