Jump to content
UCT_24

TreeView Grid lines

Recommended Posts

Hello everybody,
i am wondering if there is a property to control the appearance of TreeView Grid-lines in the VCL. The TTreeView Component has some properties like "LineMode" and "LineStyle", as well some "Colors" properties, but all these don't seem to affect the instance i want to change.
Is there maybe some property that "disables/overrides" Color and Line settings?

 

I am using C++ builder, Embarcadero® RAD Studio 11 (hoping this is enough info)


Thank you very much in advance and kind regards,
Ulrich

Share this post


Link to post

While the component has no property you can send a message to the underlying win32 component. Everything you need is in Winapi.CommCtrl. There is a TreeView_SetLineColor to send a message. 

 

Share this post


Link to post
6 hours ago, UCT_24 said:

all these don't seem to affect the instance i want to change.

It would help if you would show what you are looking at and explain exactly what you are trying to change in it. 

Share this post


Link to post

Hi all, thanks for your replies.

 

It seems i missed the "TreeOptions -> "Paint Options" in the Object inspector. Sorry for this.
What was trying to was:

1.: Show grid lines in my Tree view

2.: Choose a color for those grid lines

In the "Paint Options" you find "toShowVertGridLines" and "toShowHorzGridLines".
Activating those does the trick.

There is also a GridLineColor given under "Colors" in the Object inspector.

 

Thanks a lot and kind regards,

Ulrich

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×