onWikipedia1Click method

Applies to
TForm2

Declaration
procedure onWikipedia1Click(Sender: TObject);

Implementation

procedure TForm2.onWikipedia1Click(Sender: TObject);
var document: IHTMLDocument2;
selectionObj: IHTMLSelectionObject;
selectionRange: IHtmlTxtRange;
begin
try
if Sender<>nil then play_snd(1);
case Notebook1.PageIndex of
   0: document := wikipedia_console.Document as IHTMLDocument2;
   2: document := wikimedia_console.Document as IHTMLDocument2;
   3: document := wikidict_console.Document as IHTMLDocument2;
   5: document := wikibooks_console.Document as IHTMLDocument2;
   6: document := wikinews_console.Document as IHTMLDocument2;
   7: document := Wikiquote_console.Document as IHTMLDocument2;
   8: document := wikisource_console.Document as IHTMLDocument2;
   9: document := wikispices_console.Document as IHTMLDocument2;
end;
selectionObj := document.selection;
selectionRange := selectionObj.CreateRange as IHtmlTxtRange;
if trim(selectionRange.text)<>'' then begin
   FlatComboBox1.Text :=trim(selectionRange.text);
   NoteBook1.PageIndex :=TMenuITem(Sender).Tag;
   oxGraphicButton1Click(oxGraphicButton1);
end;
except
on E : Exception do _log_entry_error(E.ClassName,E.Message,'D90000');
end;End;


HTML generated by Time2HELP
http://www.time2help.com