anchor.diff:    Topic: TTopic;
   Begin
     ProfileEvent('DisplayTopic >>>>');
  -  if tvContents.Selection = nil then
  -  begin
  -    ShowMessage('You must select a topic first by clicking it.');
  -    Exit;  //==>
  -  end
  -  else
  -    Topic := TTopic(tvContents.Selection.Data);
  -  ProfileEvent('Got Topic from Treeview');
  +  case PageControl1.ActivePageIndex of
  +    0:  begin
  +          if tvContents.Selection = nil then
  +          begin
  +            ShowMessage('You must select a topic first by clicking it.');
  +            Exit;  //==>
  +          end
  +          else
  +            Topic := TTopic(tvContents.Selection.Data);
  +          ProfileEvent('Got Topic from Treeview');
  +        end;
  +    1:  begin
  +          if lbIndex.FocusItem = -1 then
  +          begin
  +            ShowMessage('You must select a index first by clicking it.');
  +            Exit;  //==>
  +          end
  +          else
  +            Topic := TTopic(lbIndex.Items.Objects[lbIndex.FocusItem]);
  +          ProfileEvent('Got Topic from Index listbox');
  +        end;
  +  end;
   
     Memo1.Lines.Clear;
     ImageIndices := TList.Create;
  
positive.code:     procedure   btnGoClicked(Sender: TObject);
      procedure   tvContentsChange(Sender: TObject);
      procedure   MainFormCloseQuery(Sender: TObject; var CanClose: boolean);
      procedure   FileOpen;
      function    OpenFile(const AFileNames: string): boolean;
      procedure   CloseFile;
  
negative.code:     HotTrack := False;
      PopupFrame := False;
      TabOrder := 1;
      OnDoubleClick  := @lbIndexDoubleClick;
    end;
  
    {@VFD_BODY_END: MainForm}
  