Newbish - Preferred Menu Implementation

canalrun

Well-Known Member
Licensed User
Longtime User
Hello All,
I am at a point in my first application of implementing a menu.

I see the AddMenu and such - I am up to the point of being able to click on the menu button and my menu with two icons pops up. The icons are Settings and About.

Before charging ahead, I have searched the forums and tutorials hoping to find an example of the preferred way for implementing a menu. For example, when a person clicks on Settings, I would like a screen or dialog to show that has about five radio buttons to set options (I have seen the Map library for persistent options). If a person clicks on About, I would like to show a web page.

Should I create new activities for each? Or, should I implement each as a panel that is hidden or shown? Something else? Is there an example or tutorial I should look at?

From experience, which is the preferred way to go? I always like to keep things simple. Things I am considering: implementation, working with the designer, supporting a few variants, eventually adding features.

Thanks much for your comments.

Barry.
 

derez

Expert
Licensed User
Longtime User
My way of implementation is to have a panel shown after the click of the menu, and this panel holds all the views I need. Like you said - for the settings you want to have a set of radiobuttons.
I keep the panels out of sight after completion of their design, so they do not interfere with the design of other panels, and call them in by changing their "left" property (because "visible" has no effect at the design phase).
This way I don't have to care about the order of the panels and which hides which:

B4X:
Sub Settings_click
prefpanel.Left = 0
.....
End Sub

Sub Prefpanel_Click
prefpanel.Left = 1600
.....
End Sub
 
Upvote 0
Top