Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

getting rid of image margin in TTreeView

Posted on 1998-05-19
4
Medium Priority
?
251 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 200 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: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

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…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

618 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