Menus in Designer
Hello
Before with the previous version 9.x, I had a my own menu inside the
designer. But Now with the last version 10.x, I can not. The new class is
TppTBCustomItem. I have renamed in my code the class TMenuItem for this one
but only appears the first option in the menu.
My old code is the following :
with ppDesigner.Menu do
begin
ppmMiMenu :=TMenuItem.Create(ppDesigner.Menu);
with ppmMiMenu do
begin
Caption := rsOpcionesAdicionales;
ppDesigner.Menu.Items.Add(ppmMiMenu);
end;
ppmSql:= TMenuItem.Create(ppmMiMenu);
with ppmSql do
begin
Caption := rsEditarConfiguracion;
ppmMiMenu.Add(ppmSql);
OnClick := Editar_SQL;
end;
ppmLinea:= TMenuItem.Create(ppmMiMenu);
with ppmLinea do
begin
Caption := '-';
ppmMiMenu.Add(ppmLinea);
end;
ppmOnePass:= TMenuItem.Create(ppmMiMenu);
with ppmOnePass do
begin
Caption := rsOnePass;
ppmMiMenu.Add(ppmOnePass);
OnClick := ConfigurarPasadas;
end;
end;
Can anyone help me?
Thank in advance.
Before with the previous version 9.x, I had a my own menu inside the
designer. But Now with the last version 10.x, I can not. The new class is
TppTBCustomItem. I have renamed in my code the class TMenuItem for this one
but only appears the first option in the menu.
My old code is the following :
with ppDesigner.Menu do
begin
ppmMiMenu :=TMenuItem.Create(ppDesigner.Menu);
with ppmMiMenu do
begin
Caption := rsOpcionesAdicionales;
ppDesigner.Menu.Items.Add(ppmMiMenu);
end;
ppmSql:= TMenuItem.Create(ppmMiMenu);
with ppmSql do
begin
Caption := rsEditarConfiguracion;
ppmMiMenu.Add(ppmSql);
OnClick := Editar_SQL;
end;
ppmLinea:= TMenuItem.Create(ppmMiMenu);
with ppmLinea do
begin
Caption := '-';
ppmMiMenu.Add(ppmLinea);
end;
ppmOnePass:= TMenuItem.Create(ppmMiMenu);
with ppmOnePass do
begin
Caption := rsOnePass;
ppmMiMenu.Add(ppmOnePass);
OnClick := ConfigurarPasadas;
end;
end;
Can anyone help me?
Thank in advance.
This discussion has been closed.
Comments
ReportBuilder 10.x now uses TBX components to give it the new XP look and
feel. It is still possible to create your own menu for the designer using
the MergeMenu property. This is a matter of creating a Delphi TMainMenu
object and assigning it to the MergeMenu property of the designer.
If you would like to edit the menu manually, take a look at the TppToolbar
class located in the ppToolbarTBX.pas file.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
There is also an example of this avaiable at the following link.
http://www.digital-metaphors.com/tips/Designer10_CustomizeMenusAndToolbars.zip
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com