Print Page | Close Window

Trouble with changing margins in TaskPanel

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=11735
Printed Date: 14 September 2025 at 11:01pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Trouble with changing margins in TaskPanel
Posted By: debugx
Subject: Trouble with changing margins in TaskPanel
Date Posted: 06 August 2008 at 2:46am
Hello All,

I have simple SDI application with Task Panel control on it. I set my custom paint manager and overrode GetControlMargins method for controlling task panel margins. It works ok but one moment. Once I change margin parameters from other dialog and send appropriate message to my main view the task panel appearance is not changed. My main view received the respective message but task panel margins are not changed on the fly. When I leave this dialog and return to the main view and resize it the task panel margins are changed as well. Where I am wrong? How should I invalidate my task panel from other dialog to change its margins.
this->Invalidate() does not help.

Thank you.


-------------
"Один законник с портфелем в рукаm



Replies:
Posted By: debugx
Date Posted: 07 August 2008 at 3:52am
I just need to know what does call method GetControlMargins() in task panel paint manager and how can I force calling this method manually?

-------------
"Один законник с портфелем в рукаm


Posted By: debugx
Date Posted: 08 August 2008 at 4:16am
I found out how to force recalculation of all respective metrix in the task panel for the first group:
void CMyAppView::RecalculateTaslPanelMetrix(CXTPTaskPanel* wndTaskPanel)
{
    CXTPTaskPanelGroup* welcomeGroup = wndTaskPanel->GetAt(0);
    if(welcomeGroup != NULL)
        welcomeGroup->SetExpanded(welcomeGroup->IsExpanded());
}
In this case all margins and other control length will be updated.
But this way is obviously ugly.
Are there any ways?


-------------
"Один законник с портфелем в рукаm


Posted By: Oleg
Date Posted: 08 August 2008 at 5:46am
Hi,
 
use Reposition method.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net