Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

VirtualTreeView - no of columns based on width

Posted on 2013-11-08
2
Medium Priority
?
357 Views
Last Modified: 2013-11-16
Hi

I have a Properties grid (VirtualTreeView) and it can hold from 5 - 50 lines... in 2 columns: Property, Value. The thing is that this info is for a selected object from the main grid, and since Properties grid has just a portion of screen space below the main grid, I would like to explore options how to better display Properties grid if the screen is wide enough to hold data in 4,6 or 8 columns instead of just 2.

So, Property colomn is width = 100, Value column width = 100. this is only 200 width per row. And if we have 30 lines, now you need to scroll, as only 5-8 rows fit on the screen. I would like to change the grid to show 10 columns (5 x Property & Value columns), if the screen width is > 5x200 - 1000, which usually is. So, I need to change from 1x30 (Prop&Value columns x rows) grid into 5x6 (5x Prop&Value columns, 6 rows) and all data is visible without any scrolling up and down.

I'm attaching screenshot from Excel for better understanding. So, if I have more screen space, I would like to display data in more columns and less rows, and that it is dinamyc on resizing form.

Thank you for your help!
0
Comment
Question by:Delphi_developer
[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 Comments
 

Author Comment

by:Delphi_developer
ID: 39634596
Attached file to show a design instead of just 2 columns, of 5x2 columns if the screen is wide enough. If it's only wide enough for 4 columns, then display in 4 columns.
temp.png
0
 

Accepted Solution

by:
Delphi_developer earned 0 total points
ID: 39653101
This is current solution:

I have 2 data sets, first one is the data I want to display, the second one is 'visual' data - what  I display. And OnResize I calculate the number of columns I can fit in the width of TreeView and based on this number I populate data into visual data set, so it is evenly distributed over rows and columns.
Works good, for now.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
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 is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Suggested Courses

730 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