Solved

getting rid of image margin in TTreeView

Posted on 1998-05-19
4
240 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
  • 2
  • 2
4 Comments
 
LVL 1

Expert Comment

by:TMiller
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
I guess so. Are you 100% sure it's impossible? Thanks, Tom.
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

728 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now