diff options
author | Graeme Geldenhuys <graemeg@gmail.com> | 2013-04-08 01:41:02 +0100 |
---|---|---|
committer | David Laurence Emerson <dle3ab@angelbase.com> | 2013-05-28 00:42:52 -0700 |
commit | c84490ed3ed9278d7ac45e66b4b17b437bd258ab (patch) | |
tree | 41daa0034173dea2f6301f2dd0d01667e41772a8 /src | |
parent | eb95e98e545143b89cbb791e561f905a757f24cf (diff) | |
download | fpGUI-c84490ed3ed9278d7ac45e66b4b17b437bd258ab.tar.xz |
popupmenu: Adds a convenience function AddSeparator()
I like less typing. ;-)
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/fpg_menu.pas | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gui/fpg_menu.pas b/src/gui/fpg_menu.pas index 8da9302f..91db5992 100644 --- a/src/gui/fpg_menu.pas +++ b/src/gui/fpg_menu.pas @@ -135,6 +135,7 @@ type destructor Destroy; override; procedure Close; override; function AddMenuItem(const AMenuName: TfpgString; const hotkeydef: string; OnClickProc: TNotifyEvent): TfpgMenuItem; + procedure AddSeparator; function MenuItemByName(const AMenuName: TfpgString): TfpgMenuItem; function MenuItem(const AMenuPos: integer): TfpgMenuItem; // added to allow for localization property BeforeShow: TNotifyEvent read FBeforeShow write FBeforeShow; @@ -1406,6 +1407,11 @@ begin end; end; +procedure TfpgPopupMenu.AddSeparator; +begin + AddMenuitem('-', '', nil); +end; + function TfpgPopupMenu.MenuItemByName(const AMenuName: TfpgString): TfpgMenuItem; var i: integer; |