Solved

getting rid of image margin in TTreeView

Posted on 1998-05-19
4
247 Views
Last Modified: 2010-04-06
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
Comment
Question by:tomcorcoran
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 1

Expert Comment

by:TMiller
ID: 1346323
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
 

Author Comment

by:tomcorcoran
ID: 1346324
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
 
LVL 1

Accepted Solution

by:
TMiller earned 50 total points
ID: 1346325
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
 

Author Comment

by:tomcorcoran
ID: 1346326
I guess so. Are you 100% sure it's impossible? Thanks, Tom.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

719 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question