Solved

VirtualTreeView - no of columns based on width

Posted on 2013-11-08
2
341 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Suggested Courses
Course of the Month8 days, 11 hours left to enroll

615 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