B4J Library Menubar extended *Update 1.1*

Name: GBEMenubar
Version: 1.1
Language: B4J
License: Royalty free
(C) icons Royalty free from icons8.com

*Update Version 1.1*
After a long research I found a solution for some open features I like to add. Therefor I publish this update short after release to get the missing features quickly to your hands. Look at the description in the features list with red text.

Thank you for the Basic Ideas of some Forum Members who published the code snippeds of:
ShortCut (Daestrum) and setMenuIcon (tchart clickable Title).

The B4J Menubar with extende features:
1759350356976.png


  • Custom View for Designer
  • Customizable MenuBar GUI/Properties.
  • Load Menustructure form File and build Menus and MenuItems.
  • No need to build Menus/Items via Jason Code of MenuBar-View/Menus Property.
  • Easy Add Menus/MenuItems by code manually.
  • enable/disable MenuItems by code.
  • show/hide MenuItems by code.
  • (Title) Menu and Menuitems with Icons.
  • MenuItem with Separator Line.
  • MenuItem with ShortCut Key (Ctrl+ .. ).
  • Custom Event ItemCLicked (MenuItem) with reported MenuItem-ID.
  • Custom Event MenuClicked (Title) with reported Menu-ID.
  • Activate/Deactivate Click-Beep

'# Properties #
'GBEMenuBar1.hideMenuItem '# show/hide MenuItem
'GBEMenuBar1.AddMenu '# Add (Title- ) Menu
'GBEMenuBar1.AddMenuItem '# Add (Sub-) MenuItem
'GBEMenuBar1.enableMenuItem '# enable/disable MenuItem
'GBEMenuBar1.hideMenuItem '# show/hide MenuItem
'GBEMenuBar1.LoadMenu '# load and build menu from file
'GBEMenuBar1.Menubar '# the MenuBar View
'GBEMenuBar1.actBeep '# actvate Beep

The new Menu_Clicked Event is a good place to control the access (enabled/disabled) of the attached MenuItems.

See how to install and use by attached B4J Example Projec:.
  • Example includes the CustomView as Class in clear Code.
  • B4J B4Xlib is included in Project ZIP
  • Copy Files Menu.txt (Structure Description) and MyMenu.css (custom GUI) from Example Project File Folder to your Projects Files Folder.
    Modify the files for your needs
 

Attachments

  • GBEMenuBar.b4xlib
    2.5 KB · Views: 11
  • GBEMenuBar.zip
    26.8 KB · Views: 11
Last edited:

Theera

Expert
Licensed User
Longtime User
Name: GBEMenubar
Version: 1.1
Language: B4J
License: Royalty free
(C) icons Royalty free from icons8.com

*Update Version 1.1*
After a long research I found a solution for some open features I like to add. Therefor I publish this update short after release to get the missing features quickly to your hands. Look at the description in the features list with red text.

Thank you for the Basic Ideas of some Forum Members who published the code snippeds of:
ShortCut (Daestrum) and setMenuIcon (tchart clickable Title).

The B4J Menubar with extende features:
View attachment 167502

  • Custom View for Designer
  • Customizable MenuBar GUI/Properties.
  • Load Menustructure form File and build Menus and MenuItems.
  • No need to build Menus/Items via Jason Code of MenuBar-View/Menus Property.
  • Easy Add Menus/MenuItems by code manually.
  • enable/disable MenuItems by code.
  • show/hide MenuItems by code.
  • (Title) Menu and Menuitems with Icons.
  • MenuItem with Separator Line.
  • MenuItem with ShortCut Key (Ctrl+ .. ).
  • Custom Event ItemCLicked (MenuItem) with reported MenuItem-ID.
  • Custom Event MenuClicked (Title) with reported Menu-ID.
  • Activate/Deactivate Click-Beep

'# Properties #
'GBEMenuBar1.hideMenuItem '# show/hide MenuItem
'GBEMenuBar1.AddMenu '# Add (Title- ) Menu
'GBEMenuBar1.AddMenuItem '# Add (Sub-) MenuItem
'GBEMenuBar1.enableMenuItem '# enable/disable MenuItem
'GBEMenuBar1.hideMenuItem '# show/hide MenuItem
'GBEMenuBar1.LoadMenu '# load and build menu from file
'GBEMenuBar1.Menubar '# the MenuBar View
'GBEMenuBar1.actBeep '# actvate Beep

The new Menu_Clicked Event is a good place to control the access (enabled/disabled) of the attached MenuItems.

See how to install and use by attached B4J Example Projec:.
  • Example includes the CustomView as Class in clear Code.
  • B4J B4Xlib is included in Project ZIP
  • Copy Files Menu.txt (Structure Description) and MyMenu.css (custom GUI) from Example Project File Folder to your Projects Files Folder.
    Modify the files for your needs
After I have test,I found that I can't change hotkey ctrl+D to be Alt+D. How to fix this problem,Sir.
 

Guenter Becker

Active Member
Licensed User
Hello,
that is correct. In Version 1.1. the Key is fixed to Ctrl. I recognized that and will update to Version 1.2 in the next week. This update will give you the feature you are searching for to choose between ctrl and alt.
If you can't wait you have to modifiy the customview code (sub addMemuItem) and the format of the Menu.txt too because at the moment the Menu.txt structure file does not include it..
 
Top