Solved

VirtualTreeView - no of columns based on width

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

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 The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

762 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

21 Experts available now in Live!

Get 1:1 Help Now