Hidden buttons in CXTPToolBar? |
Post Reply |
Author | |
znakeeye
Senior Member Joined: 26 July 2006 Status: Offline Points: 1672 |
Post Options
Thanks(0)
Posted: 29 April 2008 at 6:30am |
CXTPToolBar in XTP 11.2.1.
1) How do you hide a toolbar? pToolBar->SetVisible(FALSE) has no effect :(
2) When a toolbar is hidden in runtime, how do you make it impossible for the user to re-show it? E.g., the Codejock GUI lets the user show hidden items via the right-click menu. Do we have to remove the items from the toolbars? If so, that leads to problems when we, inside our code, really want to show the items!
To summarize: Is it possible to hide items 100%?
3) How do you use LoadCommandBars only for the positioning of the toolbars? As it is now, hidden items tend to become visible after this call! That is, it seems the toolbars are completely read from the registry -- which we do not want!
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
1. SetVisible have to work. You do something wrong in your code.
2. After you hide it call
SetContextMenuPresent(FALSE) and SetCustomizeDialogPresent(FALSE);
3. Don't use Customization in this case. remove XTP_ID_CUSTOMIZE command handler from message map. or call for toolbar
m_wndToolBar.SetCustomizable(FALSE);
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
znakeeye
Senior Member Joined: 26 July 2006 Status: Offline Points: 1672 |
Post Options
Thanks(0)
|
1. My mistake!
2. AHAAA! Thanks!
3. Too bad. We want to use customization for user-hidden items (that is, 99% hidden ). No further ideas?
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
3. I not exactly sure what task you have.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
cuisinart
Groupie Joined: 31 January 2012 Status: Offline Points: 10 |
Post Options
Thanks(0)
|
Previously, my application used the ShowControlBar method in the main frame: ShowControlBar(&m_wndToolToolBar ,false,false); to hide toolbars. This hid them and also removed the empty bar tray if it was empty. From this chat it sounds like the XTToolkit equivalent of CFrameWnd::ShowControlBar() is: pToolBar->ShowWindow(FALSE); pToolBar->SetContextMenuPresent(FALSE); pToolBar->SetCustomizeDialogPresent(FALSE); but there's a problem! The empty toolbar docking trays remain visible in the application. How can this be cleared? |
|
mgampi
Senior Member Joined: 14 July 2003 Status: Offline Points: 1201 |
Post Options
Thanks(0)
|
Have you already solved this problem?
|
|
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 |