Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Toutline component

Status
Not open for further replies.

Brabrabra

Programmer
Joined
Mar 12, 2002
Messages
6
Location
NL
I REALLY don't get this Toutline component. I want to use it to show the index of a book, like: Book -> Chapter -> Paragraph -> Page and I have it like that. But now I want to be able to click on a page and then I want that page (a HTML file) to be shown in a TWebBrowser. But how can I do that? TForm1.Toutline1Click only gives me a Sender which is the Toutline itself, and not the page1 or page2 line!

Please help! :)
 
in OneMouseDown event you get X and Y pixel coordinates. Use GetItem(X, Y) to get the item clicked on.

good luck !
Roderich
 
Hi,

Use the SelectedItem property, for example, on the OnClick event of TOutLine Component.

procedure TForm1.Outline1Click(Sender: TObject);
begin
Label1.caption := Outline1.Lines[Outline1.selecteditem-1];
end;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top