Link to home
Start Free TrialLog in
Avatar of pede
pede

asked on

TOutline component

I think this should be an easy one; I need a TOutline component where the elements can have different colors and/or fonts.
I've seen one once, but I deleted it, and I can't seem to loctate it again.

It MUST run on windows 3.1 (Delphi 1).

/Pede

Avatar of ZifNab
ZifNab

Hi pede,

 this one? (has corrected owner draw event)

 http://sunsite.icm.edu.pl/delphi/ftp/d10free/outlinep.zip

regards, Zif.
Avatar of pede

ASKER

Sort of. You mean I should ownerdraw the text?

/Pede

Yep, why not?
Avatar of pede

ASKER

OK, I will draw the text myself, but I dont really know how to start on this. Do you have a small example of a 'OnDrawItem'-procedure? I tried this line -  (Control as TOutline).Canvas.TextRect(Rect, 0,0, 'Test'); - and I expected that 'Test' would be drawn for every item in the tree, but I only got it once (in the top-left corner of the tree-canvas). And what about the lines connecting the items, and the bitmaps? They are all gone.

/Pede
 
Avatar of pede

ASKER

Is the above the old bug of the TOutline? Maybe my project is still using the old one. I have now removed outline.dcu from /lib and I can still compile without errors. Are the lines (the connecting ones) supposed to be drawn by the control?

/Pede

Avatar of pede

ASKER

OK, its all working now. Zifnab, please propose an answer so you can get your points ;)

/Pede

ASKER CERTIFIED SOLUTION
Avatar of ZifNab
ZifNab

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of pede

ASKER

I've got it all working now. Thank you for your help.

/Pede