Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Optimizing the width of text grid controls
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00564807
Message ID:
00566031
Views:
15
Vlad,

Thank you for the pointer. I will read the article.

>Hi!
>
>In addition to what was described already, take a look to the VFP Grids Part III article in the Universal thread Magazine, last (October) issue. I described there approach to resize column accordingly to the data in it when user double click on the resizing area of the grid column header. The article contains download with complete sample and source code of the grid classes (it is also in the downloads section here).
>
>You can use that algorithm also in the Init of the form in your case. However, I guess it is good idea to leave this feature for users by allowing them double click on resizing area. This is because when grid content changed by changing data queried into grid, some coulmns might require width change again, as well as user can edit data so some rows in grid will also require change of the column width.
>
>HTH.
>
>>Is it possible to optimize the width of text grid controls in a program?
>>
>>The scenario is that I have a grid where there is just enough room on the screen to display each row using the existing maximum length of data contained in each field. For example, when displaying a product's data, I found the item with the longest description and manually sized the control accordingly. I followed the same procedure for other read only controls. As mentioned above, when completed, the row just fits on the screen without scrolling.
>>However, the data is not static and I would like the controls to automatically resize themselves everytime the form is run.
>>Is this practical? possible?
>>TIA.
Regards,

Allan Coganovitch
allanc@proven-solutions.com
Previous
Reply
Map
View

Click here to load this message in the networking platform