How to auto size groups |
Post Reply |
Author | ||
mgampi
Senior Member Joined: 14 July 2003 Status: Offline Points: 1201 |
Post Options
Thanks(0)
Posted: 19 March 2007 at 1:23pm |
|
Hi;
I've created a CXTPTaskPanel within a resizable dialog, that contains only one group. When the user resizes the dialog, I want the group to be resized too, so that the group occupies the whole task panel rect (minus any margins set). The width is resized automatically, but the height stays always the same!
Any hints on how to achieve this are welcome.
|
||
Martin Product: Xtreme Toolkit v 22.1.0, new Projects v 24.0.0 Platform: Windows 10 v 22H2 (64bit) Language: VC++ 2022 |
||
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
|
Hi,
Change its behaviour to xtpTaskPanelBehaviourToolbox.
|
||
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
||
mgampi
Senior Member Joined: 14 July 2003 Status: Offline Points: 1201 |
Post Options
Thanks(0)
|
|
Thanks Oleg, this works!
But now, where's the best place to size the dialog contained within the group, so that it spans the whole group client area?
In my CXTPTaskPanel parent class I do it like this:
if (_panel.GetSafeHwnd())
{
_panel.MoveWindow(rcClient);
CXTPTaskPanelGroup* pGroup=_panel.FindGroup(0);
if (pGroup!=0){
CXTPTaskPanelPaintManager* pPainter=_panel.GetPaintManager();
CRect rcGrpClient=pGroup->GetClientRect();
CRect rcMargins=pPainter->GetGroupInnerMargins(pGroup);
rcGrpClient.DeflateRect(rcMargins.left, rcMargins.top, rcMargins.right, rcMargins.bottom);
_taskDlg.MoveWindow(rcGrpClient);
}
}
But this leads to some unwanted flickering - I believe that the task panel first (re)sizes the dialog to its initial size as set in .rc file and then my code is executed.
Any ideas? |
||
Martin Product: Xtreme Toolkit v 22.1.0, new Projects v 24.0.0 Platform: Windows 10 v 22H2 (64bit) Language: VC++ 2022 |
||
mgampi
Senior Member Joined: 14 July 2003 Status: Offline Points: 1201 |
Post Options
Thanks(0)
|
|
Hi Oleg;
I solved it myself. I knew the CXTPTaskPanelItem::SetSize(..,AutoHeight) function but I forgot to call it.
Nevertheless thanks for a great product!
|
||
Martin Product: Xtreme Toolkit v 22.1.0, new Projects v 24.0.0 Platform: Windows 10 v 22H2 (64bit) Language: VC++ 2022 |
||
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 |