<< Click to Display Table of Contents >> Navigation: Programming > User Interface > Toolbar > Ribbon Applications > TMS Office 2010 > Make the File menu work |
To do so we have to add the frame unit which implements the file menu. We renamed that to "FileMenuOverlay.pas".
The Menu is a TAdvPolyMenu and we can enter the property editor with a double click on the menu.
Here we can add some code to execute the default actions. By doing so, we avoid the dependency to a TWPRichText and make the approach more universal.
procedure TTMSFrame1.OpenBtnItemClick(Sender: TObject; Item: TCustomItem);
begin
WPDefaultActions.WPDefAct.aFile_Open1.Execute;
end;
procedure TTMSFrame1.SaveAsBtnItemClick(Sender: TObject; Item: TCustomItem);
begin
WPDefaultActions.WPDefAct.aFile_SaveAs.Execute;
end;
Using Actions here is also possible, but it makes it more difficult to show a different icon.