Jacek Laskowski 57 Posted May 20, 2020 I have TMemo and TVirtualTreeView on my form. Both controls set the same font, Ubuntu Mono. The text in both controls is the same, contains one tab (#9, marked in memo). Why does TMemo display it differently (wide) and VTV differently (narrow)? Share this post Link to post
Lars Fosdal 1792 Posted May 20, 2020 TMemo wraps a native windows control. TVirtualTreeView, all custom. Not sure if you can adujst tab rendering in TVTV, but you can set tab stops in TMemohttp://delphitipsandtricks2.blogspot.com/2012/03/set-tab-stops-for-tmemo.html Share this post Link to post
Jacek Laskowski 57 Posted May 20, 2020 Thanks, but this solution not working with VTV. Possibly VTV not support change this parameter. Share this post Link to post
Attila Kovacs 629 Posted May 20, 2020 (edited) you have to edit VTV sources and before every DrawText(W) do a DrawFormat := DrawFormat or DT_EXPANDTABS or DT_TABSTOPS; DrawFormat := DrawFormat or (FTabwidth shl 8); and you can create a property of FTabwidth, (plus one for Expandtabs yes/no). Edited May 20, 2020 by Attila Kovacs 1 Share this post Link to post
Jacek Laskowski 57 Posted May 28, 2020 On 5/20/2020 at 9:19 PM, Attila Kovacs said: you have to edit VTV sources and before every DrawText(W) do a DrawFormat := DrawFormat or DT_EXPANDTABS or DT_TABSTOPS; DrawFormat := DrawFormat or (FTabwidth shl 8); and you can create a property of FTabwidth, (plus one for Expandtabs yes/no). Thanks, this works! Share this post Link to post