diff options
author | Graeme Geldenhuys <graemeg@gmail.com> | 2013-04-08 01:41:02 +0100 |
---|---|---|
committer | Graeme Geldenhuys <graemeg@gmail.com> | 2013-04-08 01:41:02 +0100 |
commit | 274c52a488fe61036ed8cb520c7d2c15412bc827 (patch) | |
tree | d2f25bcdc77ad0d9c4a3354bedfd420928e04d26 | |
parent | 4a16290513e9719cf71987da9b325d0534dde54f (diff) | |
download | fpGUI-274c52a488fe61036ed8cb520c7d2c15412bc827.tar.xz |
popupmenu: Adds a convenience function AddSeparator()
I like less typing. ;-)
-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; |