Dialogs |
Post Reply |
Author | |
terrym
Senior Member Joined: 13 April 2007 Status: Offline Points: 836 |
Post Options
Thanks(0)
Posted: 09 June 2007 at 4:26am |
Hi
Does anybody know how to get a dialog (without frames) to appear below popup buttons, eg. on ribbon bars
Thanks any help appreciated
Terry
|
|
Thank you,
Terry Mancey email terry@tmancey.ltd.uk | linkedin www.tmancey.ltd.uk | twitter @tmancey |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hello,
Use CXTPControlCustom to attach dialog.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
terrym
Senior Member Joined: 13 April 2007 Status: Offline Points: 836 |
Post Options
Thanks(0)
|
Excellent, are there any examples showing this working please ?
|
|
Thank you,
Terry Mancey email terry@tmancey.ltd.uk | linkedin www.tmancey.ltd.uk | twitter @tmancey |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
See for example Samples\CommandBars\CommonControls sample it show how to add standard combo boxes to Toolbar - use same way for ribbon and dialogs.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
terrym
Senior Member Joined: 13 April 2007 Status: Offline Points: 836 |
Post Options
Thanks(0)
|
still none the wiser, anychance of an example here, eg. I have a dialog in my resource ID_MY_DIALOG, how would I make this appear on a ribbon when I click a button popup
|
|
Thank you,
Terry Mancey email terry@tmancey.ltd.uk | linkedin www.tmancey.ltd.uk | twitter @tmancey |
|
terrym
Senior Member Joined: 13 April 2007 Status: Offline Points: 836 |
Post Options
Thanks(0)
|
Ok I have the following code:
CXTPControlPopup *pControlPopup = (CXTPControlPopup *)pRibbonGroup->Add( xtpControlPopup, ID_FORMAT_ADDCUSTOM );
m_AddCustomDlg.Create( MAKEINTRESOURCE( CAddCustomDlg::IDD ), this );
pControlPopup->SetBeginGroup( TRUE ); CXTPControlCustom *pControlCustom = CXTPControlCustom::CreateControlCustom( &m_AddCustomDlg );
however how do I then attach this custom control to the xtpControlPopup so that when I click thispopup button it shows my dialog ?? Thanks, any help appreciated
Terry
|
|
Thank you,
Terry Mancey email terry@tmancey.ltd.uk | linkedin www.tmancey.ltd.uk | twitter @tmancey |
|
Simon HB9DRV
Senior Member Joined: 07 July 2005 Location: Switzerland Status: Offline Points: 458 |
Post Options
Thanks(0)
|
I would also be very interested in a working example so that pressing a toolbar button brings up my own dialog just below the button I pressed.
|
|
Simon HB9DRV
|
|
terrym
Senior Member Joined: 13 April 2007 Status: Offline Points: 836 |
Post Options
Thanks(0)
|
The following code adds a dialog to a popup button:
CXTPControlPopup *pControlPopup = (CXTPControlPopup *)pRibbonGroup->Add( xtpControlPopup, ID_BUTTON );
m_CustomDlg.Create( MAKEINTRESOURCE( CCustomDlg::IDD ), this );
CXTPControlCustom *pControlCustom = CXTPControlCustom::CreateControlCustom( &m_CustomDlg );
( CXTPControlCustom *)pControlPopup->GetCommandBar()->GetControls()->Add( pControlCustom );Any further questions please let me know
|
|
Thank you,
Terry Mancey email terry@tmancey.ltd.uk | linkedin www.tmancey.ltd.uk | twitter @tmancey |
|
Simon HB9DRV
Senior Member Joined: 07 July 2005 Location: Switzerland Status: Offline Points: 458 |
Post Options
Thanks(0)
|
Thanks - I'll give it a go this evening...
|
|
Simon HB9DRV
|
|
terrym
Senior Member Joined: 13 April 2007 Status: Offline Points: 836 |
Post Options
Thanks(0)
|
only problem I am experiencing is that when I click a button, eg. CANCEL and then close the dialog, it does not close ?
i can close it by clicking outside the area, if you find solutioin please let me know.
|
|
Thank you,
Terry Mancey email terry@tmancey.ltd.uk | linkedin www.tmancey.ltd.uk | twitter @tmancey |
|
Simon HB9DRV
Senior Member Joined: 07 July 2005 Location: Switzerland Status: Offline Points: 458 |
Post Options
Thanks(0)
|
Please cut and paste your dialog resource from the .rc file - will be interesting....
|
|
Simon HB9DRV
|
|
terrym
Senior Member Joined: 13 April 2007 Status: Offline Points: 836 |
Post Options
Thanks(0)
|
Its just a standard dialog with an IDOK and IDCANCEL button, I then override OnCancel and OnOk
Normally these would then close the dialog, however for some reason the dialog closes but leaves a blank dialog lol :(
|
|
Thank you,
Terry Mancey email terry@tmancey.ltd.uk | linkedin www.tmancey.ltd.uk | twitter @tmancey |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Yes, you have manually close popup (why it have close automatically?)
override OnOK and OnCancel and call
XTPMouseManager()->SendTrackLost();
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
terrym
Senior Member Joined: 13 April 2007 Status: Offline Points: 836 |
Post Options
Thanks(0)
|
Excellent, worked perfect :)
Thanks for continued great support.
Also off subject of this topic but is there a way of detecting if a ribbon was minimized/restored as we need to detect this to rebuild our workspace
Again, thanks for all the great support
|
|
Thank you,
Terry Mancey email terry@tmancey.ltd.uk | linkedin www.tmancey.ltd.uk | twitter @tmancey |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi
call pRibbonBar->IsRibbonMinimized (or IsMinimized)
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
terrym
Senior Member Joined: 13 April 2007 Status: Offline Points: 836 |
Post Options
Thanks(0)
|
rather than poll pRibbonBar->IsRibbonMinimized every x frames, is there not a windows message I can use instead to say the ribbons changed state
|
|
Thank you,
Terry Mancey email terry@tmancey.ltd.uk | linkedin www.tmancey.ltd.uk | twitter @tmancey |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hello,
No, sorry, there is no message. You can change source code, make SetRibbonMinimized method virtual and override it in your custom Ribbon class. We will make it virtual too for next releases.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
terrym
Senior Member Joined: 13 April 2007 Status: Offline Points: 836 |
Post Options
Thanks(0)
|
Excellent as I am sure many other users would find SetRibbonMinimized() as a virtual function much better. |
|
Thank you,
Terry Mancey email terry@tmancey.ltd.uk | linkedin www.tmancey.ltd.uk | twitter @tmancey |
|
terrym
Senior Member Joined: 13 April 2007 Status: Offline Points: 836 |
Post Options
Thanks(0)
|
I have tried this and made the function virtual, but it is not working ???
I have attached my CMyXTPRibbonBar class if anybody has any ideas :(
|
|
Thank you,
Terry Mancey email terry@tmancey.ltd.uk | linkedin www.tmancey.ltd.uk | twitter @tmancey |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
How do you create CMyXTPRibbonBar instead CXTPRibbonBar ? Did you rebuild toolkit?
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
terrym
Senior Member Joined: 13 April 2007 Status: Offline Points: 836 |
Post Options
Thanks(0)
|
I create it using
CMyXTPRibbonBar *m_pRibbonBar;
and then use this for all calling
Cheers
|
|
Thank you,
Terry Mancey email terry@tmancey.ltd.uk | linkedin www.tmancey.ltd.uk | twitter @tmancey |
|
terrym
Senior Member Joined: 13 April 2007 Status: Offline Points: 836 |
Post Options
Thanks(0)
|
and yes I did rebuild all tookit with the new virtual
|
|
Thank you,
Terry Mancey email terry@tmancey.ltd.uk | linkedin www.tmancey.ltd.uk | twitter @tmancey |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
you also need
1. To add
DECLARE_XTP_COMMANDBAR(CMyXTPRibbonBar )
IMPLEMENT_XTP_COMMANDBAR(CMyXTPRibbonBar, CXTPRibbonBar) macros 2.
CMyXTPRibbonBar * pRibbonBar = (CXTPRibbonBar*)pCommandBars->Add(_T("The Ribbon"), xtpBarTop, RUNTIME_CLASS(CMyXTPRibbonBar ));
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
terrym
Senior Member Joined: 13 April 2007 Status: Offline Points: 836 |
Post Options
Thanks(0)
|
We already do #2, however #1 where do we put this as we get compile errors when we try.
Cheers
Terry
|
|
Thank you,
Terry Mancey email terry@tmancey.ltd.uk | linkedin www.tmancey.ltd.uk | twitter @tmancey |
|
terrym
Senior Member Joined: 13 April 2007 Status: Offline Points: 836 |
Post Options
Thanks(0)
|
Ah sorted cheers, it was a ; in wrong place lol
Thanks for help, as works great now
|
|
Thank you,
Terry Mancey email terry@tmancey.ltd.uk | linkedin www.tmancey.ltd.uk | twitter @tmancey |
|
terrym
Senior Member Joined: 13 April 2007 Status: Offline Points: 836 |
Post Options
Thanks(0)
|
Also we have noticed that:
ShowQuickAccess( BOOL bShow )
and
ShowQuickAccessBelowRibbon( BOOL bBelow )
should both really also be virtual as this allows to detect other situations that can change the size of the workspace view area etc.
|
|
Thank you,
Terry Mancey email terry@tmancey.ltd.uk | linkedin www.tmancey.ltd.uk | twitter @tmancey |
|
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 |