![]() |
Creating a Ribbon in Delphi |
Post Reply
|
| Author | |
ggibaut
Newbie
Joined: 26 June 2007 Location: Argentina Status: Offline Points: 4 |
Post Options
Thanks(0)
Quote Reply
Topic: Creating a Ribbon in DelphiPosted: 26 June 2007 at 12:06pm |
|
How do you create a Ribbon in Delphi 7?
I imported the ActiveX using Delphi Wizard. A sample sketch of my code is the following: procedure TForm1.FormCreate(Sender: TObject); var CommandBarsFrame: TCommandBarsFrame; Ribbon: IRibbonBar; begin CommandBarsFrame := TCommandBarsFrame.CreateParented(Self.Handle); CommandBarsFrame.EnableOffice2007Frame(True); CommandBarsFrame.VisualTheme := xtpThemeRibbon; Ribbon := CommandBarsFrame.AddRibbonBar(Widestring('Sample')); Assert(Ribbon <> nil); //the Ribbon is always nil end; What i´m missing? Thanks in advance |
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 26 June 2007 at 3:36pm |
|
Hi,
try to move CommadnBarsFrame to form - do not create dynamically.
|
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
Dev69
Groupie
Joined: 15 February 2007 Location: France Status: Offline Points: 23 |
Post Options
Thanks(0)
Quote Reply
Posted: 02 July 2007 at 10:37am |
|
Do You really need Frame object...
the following code works perfectly FCommandBars := TCommandBars.CreateParented(FFormOwner.Handle); FRibbon := FCommandBars.AddRibbonBar(FFormOwner.Name) regards |
|
![]() |
|
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 |