Solved

getting rid of image margin in TTreeView

Posted on 1998-05-19
4
243 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
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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

810 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