HOWTO: Use BestFit() in tree like mode |
Post Reply |
Author | |||
mgampi
Senior Member Joined: 14 July 2003 Status: Offline Points: 1198 |
Post Options
Thanks(0)
Posted: 27 April 2011 at 4:10am |
||
Hi:
I can't figure out how to use CXTPReportHeader::BestFit() in tree-like control mode. It works very well in simple mode, but in tree-like mode with collapsed nodes the calculated column width is wrong. It seems as if only visible rows are considered. How can I calculate the required width over all rows whether they are collapsed or not? First expanding all nodes and then collapsing them again on startup/reload is no option because this would take a long time to process. TIA |
|||
Martin
Product: Xtreme Toolkit v 19.0.0, new Projects v 19.1.0 Platform: Windows 10 v 1909 (64bit) Language: VC++ 2017 |
|||
ChrisBamford
Newbie Joined: 02 February 2011 Status: Offline Points: 8 |
Post Options
Thanks(0)
|
||
Hi, I have a similar issue to this with version 13.4.2.
I have a tree structure that can be up to 4 levels deep, e.g.:
The issue for me is that after calling BestFit for all columns on a report control, the second column (which is the tree column, is not resized as I would expect. Following is an example screenshot. Here is the code I'm using to call BestFit
pthis is a pointer to the current dialog. And here is the code I'm using to create the columns:
Hopefully I've not broken any forum rules in this post. Many thanks for any help/advice that can be provided. Chris. |
|||
ChrisBamford
Newbie Joined: 02 February 2011 Status: Offline Points: 8 |
Post Options
Thanks(0)
|
||
Hi,
One work around I have found, which is not a perfect solution, is to find the deepest leaf in the tree and then add a child record to that leaf (call this pChild for example). This helps force the column width of the parent record of pChild to be something more appropriate. Thx, Chris. |
|||
ABuenger
Newbie Joined: 02 February 2006 Status: Offline Points: 1075 |
Post Options
Thanks(0)
|
||
Hi Martin and Chris,
could you create a small sample that demonstrates your problem and then attach it to a new ticket or here? Andre |
|||
Codejock support
|
|||
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |