![]() |
Trouble with changing margins in TaskPanel |
Post Reply ![]() |
Author | |
debugx ![]() Groupie ![]() ![]() Joined: 23 June 2008 Location: Andorra Status: Offline Points: 28 |
![]() ![]() ![]() ![]() ![]() 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
|
|
![]() |
|
debugx ![]() Groupie ![]() ![]() Joined: 23 June 2008 Location: Andorra Status: Offline Points: 28 |
![]() ![]() ![]() ![]() ![]() |
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
|
|
![]() |
|
debugx ![]() Groupie ![]() ![]() Joined: 23 June 2008 Location: Andorra Status: Offline Points: 28 |
![]() ![]() ![]() ![]() ![]() |
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
|
|
![]() |
|
Oleg ![]() Senior Member ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hi,
use Reposition method.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
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 |