An easy to use menu that can be displayed from various positions on the users screen. It can contain bitmaps along with the menu item name(s).
This is version 1.1.1. source iin B4A and test project is attached in the menusrc.zip file.
MLmenu
Author: Jem Miller
Version: 1.11
Versions
1.1.0 - Initial release
1.1.1 - Added OpenMenuCentered to open the menu centered in the screen. Fixed a pesky bug in the OpenMenuAt routine.
.
This is version 1.1.1. source iin B4A and test project is attached in the menusrc.zip file.
MLmenu
Author: Jem Miller
Version: 1.11
- MLmenu
Events:- Click (Position As Int, Value As String)
- IsInitialized As Boolean
Tests whether the object has been initialized. - addmenuitem (Title As String, Image As BitmapWrapper) As String
Adds an item to the menu.
Title - title displayed in the menu.
Image - Pass Null if there is no image to load. - addmenuitemat (Title As String, Image As BitmapWrapper, Position As Int) As String
Adds an item to the menu in the specified position.
Title - title displayed in the menu.
Image - put Null if there is no image to load.
Position - position in the menu. - closemenu As String
Programmatically closes the menu. - initialize (MaxItemShow As Int, ItemHeight As Int, Parent As ActivityWrapper, Module As Object, bgColor As Int, txtColor As Int, TextSize As Float, Event As String) As String
Initializes the ModularMenu.
MaxItemShow - maximum number of item visible in the menu.
HeightItem - height of each item. in DIP units.
Parent - The Main Activity (Should always be Activity)
Module - must be Me (with no " marks)
bgColor - Menu color
txtColor - Text color
TextSize - Text size
Event - Event name to raise on Click event (create an event with this prototype: Event_Click(Position as Int, Value as String). - isvisible As Boolean
Returns True if menu is currently showing. - openmenu As String
Programmatically opens the menu. - openmenuat (Left As Int, Top As Int) As String
Programmatically opens the menu at a specified location.
Left - Left edge of menu.
Top - Top edge of menu. - openmenucentered - Opens the menu in the center of the screen
- removeall As Boolean
Removes all items from the menu. - removeat (Index As Int) As Boolean
Removes the item at the specified position. - size As Int
Returns the number of menu items [read only].
Versions
1.1.0 - Initial release
1.1.1 - Added OpenMenuCentered to open the menu centered in the screen. Fixed a pesky bug in the OpenMenuAt routine.
.
Attachments
Last edited: