• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 255
  • Last Modified:

getting rid of image margin in TTreeView

How can I get rid of the 'margin' in a TTreeView when there is no image, in other words move the text over and not have the space for the image.

Is doing a clear on the TTreenodes destroying them also?

Thanks,

Tom.
0
boardtc
Asked:
boardtc
  • 2
  • 2
1 Solution
 
TMillerCommented:
There could be two propertie related to your question, if I understand correctly. First is Indent, which sets the size of the lines connecting each node. The default value is 19. Second property is the Images (and StateImages) property which lets you store images. The regular images are like the folder icons in the explorer, state are a second level of images, not very common
but still some apps use'em. If you dont mean any of these spaces, please let me know.
0
 
boardtcAuthor Commented:
TMiller, thanks for the response. The problem is Indent is a property of TTreeView and so will effect the whole tree. I only want the margin to disappear for those nodes where I don;t have an image. Any ideas? Thanks, Tom.
0
 
TMillerCommented:
Oh, now I understand what you mean. With the Delphi supplied TTreeView, what you want is impossible, I tried setting imageindex to -1 and stuff like that, couldn't be done!

If you need it badly, what you should do is try changing the component it self, but since it's a COM object, that wouldn't be easy. I found an OCX of a TreeView, written in VB5 which include the source of the component, if you know VB and wish to dig deep into it, that could be the solution.

If the answer is NO, is it still an answer?
0
 
boardtcAuthor Commented:
I guess so. Are you 100% sure it's impossible? Thanks, Tom.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now