navigationPane, application menu problem
Hello
I'm trying to add a topic page to my application. The only thing is that when I write the code that I think that what is good, it won't.
Here is the code:
import bb.cascades 1.0 import bb.data 1.0 NavigationPane { id: navPane Menu.definition: MenuDefinition { actions: [ ActionItem { title: "About" imageSource: "images/ic_info.png" onTriggered: { navPane.push(infoDS.createObject()) } } ] }
... later on in attachedObjects:
ComponentDefinition { id: infoDS source: "aboutDutchscene.qml" }
When I remove these codes that the app works fine, when I have this code the application will load only the splash screen.
Anyone who is familiar with that? I'm hoping to find a solution!
Thanks in advance for your help,
Stanley
You try to put a NavigationPane in a NavigationPane. It does not work.
Your main.qml page takes the NavigationPane and your first information Page.
NavigationPane { id: mainNavPane Page { id:mainPage Container { // Info page components } actions: [ ActionItem { id: aiAboutButton imageSource: "asset:///images/ic_info.png" title:"About" onTriggered: { navPane.push(infoDS.createObject()); } attachedObjects: [ ComponentDefinition { id: infoDS AboutDutchscene { } } ] } ] } onPopTransitionEnded: { // Destroy the popped Page once the back transition has ended. page.destroy(); } }
Then push page should just be a Page
Page { id:aboutDutchscenePage Container { layout: DockLayout {} ImageView { horizontalAlignment: HorizontalAlignment.Fill verticalAlignment: VerticalAlignment.Fill imageSource: "asset:///images/background.png" } Container { horizontalAlignment: HorizontalAlignment.Fill verticalAlignment: VerticalAlignment.Fill Container { horizontalAlignment: HorizontalAlignment.Center layout: DockLayout {} ImageView { horizontalAlignment: HorizontalAlignment.Fill verticalAlignment: VerticalAlignment.Fill imageSource: "asset:///images/header_background.png" } Label { horizontalAlignment: HorizontalAlignment.Center text: qsTr ("About") textStyle.base: SystemDefaults.TextStyles.BigText textStyle.color: Color.create("#bb0099CC") } } } } }
You can probably push a NavigationPane in a NavigationPane, but you must first a Page, and then click a container to push in.
Tags: BlackBerry Developers
Similar Questions
-
Beta 3: call the application menu NavigationPane
Now we can define menus of applications of Cascades in Beta 3, I tried to find how we can call all windows in a SettingsActionItem.
I have a pane with tabs with a declared MenuDefination. I want to call a QML file that is a NavigationPane that contains the list of parameters. I have tried to seem so all documentation and sample applications and do not see the right way to do this. It would be nice to have a applications examples with an application menu that calls a settings screen.
Can anyone help or recommend best practices for this?
Thanks in advance.
Ok. I managed to do the work.
hand. QML
import bb.cascades 1.0 TabbedPane { showTabsOnActionBar: true Menu.definition: MenuDefinition { helpAction: HelpActionItem { imageSource: "asset:///icons/help.png" } settingsAction: SettingsActionItem { imageSource: "asset:///icons/setting.png" onTriggered : { settingsSheet.open() } } actions: [ ActionItem { title: "Info" imageSource: "asset:///icons/info.png" } ] } attachedObjects: [ Sheet { id: settingsSheet objectName: "settingsSheet" content: SettingsSheet { id: settingsContent } } ] Tab { title: qsTr("Tab 1") Page { id: tab1 Container { Label { text: qsTr("Tab 1 title") } } } } Tab { title: qsTr("Tab 2") Page { id: tab2 Container { Label { text: qsTr("Tab 2 title") } } } } Tab { title: qsTr("Tab 3") Page { id: tab3 Container { Label { text: qsTr("Tab 3 title") } } } } onCreationCompleted: { OrientationSupport.supportedDisplayOrientation = SupportedDisplayOrientation.All; } }
SettingsSheet.qml
import bb.cascades 1.0 NavigationPane { Page { Container { Label { text: "Settings Page" } } } }
-
How to create the application menu?
Hello
I want to add to the settings page for my application.
I created the application menu in the Navigation pane.
See my coding:
NavigationPane { id: navigationPane Page { id: mainpage Menu.definition: MenuDefinition { actions: [ ActionItem { title: "Action" imageSource: "asset:///images/setting.png" onTriggered: { navigationPane.push(settings.createObject()) } attachedObjects: [ ComponentDefinition { id: settings source: "setting.qml" } ] } ActionItem { title: "help" imageSource: "asset:///images/help.png" } ] } titleBar: TitleBar { title: "Main Bar" } } }
and on settings.qml
Page { id: settings titleBar: TitleBar { title: "Settings" } Container { background: Color.Yellow Label { text: "Want [Dark or White] theme selet below" } DropDown { title: "Select Theme" Option { text: "Dark" onSelectedChanged: { if (Application.themeSupport.theme.colorTheme.style == VisualStyle.Bright) { Application.themeSupport.setVisualStyle(VisualStyle.Dark); } else { Application.themeSupport.setVisualStyle(VisualStyle.Bright); } } } Option { text: "white" selected: true onSelectedChanged: { if (Application.themeSupport.theme.colorTheme.style == VisualStyle.Bright) { Application.themeSupport.setVisualStyle(VisualStyle.Dark); } } } } } }
and I see not the menu look at this picture
now, I want the solution please can someone help.
-shaishad
the definition of menu on the navigationpane
-
I have a navigationPane with an Application Menu. One of the items in this menu is settings so
When I click on parameter I shows the Settings Page but I would like to turn off the Menu of the Application
When the user on the Configuration pageI put in the onCreationCompleted of my settingPage
Application.menuEnabled = false;And when I click on the back button I do:
Application.menuEnabled = true;
navigationPane.pop ();However, the Application Menu is always displayed in the settings page, so how can I disable it?
I did it!
When I press settings page, I disbale the application from the page menu, then
ActionItem { title: "Preferencias" imageSource: "asset:///images/ic_settings.png" onTriggered: { var page = getPreferenciasPage(); page.onRefreshDropDownLicencia.connect(onRefreshDropDownLicencia); Application.menuEnabled = false; navigationPane.push(page); } function getPreferenciasPage() { if (! preferenciasPage) { preferenciasPage = idPreferenciasPage.createObject(); } return preferenciasPage; } },
-
Problem to apply the profile! "How to fix
Hi, my laptop is connected to the internet before, but now when I want to connect I get this message "Application Profile problem!" how to solve this problem.I search in Google allot, but I a not end an answer to solve my problems. Can someone help me?Thank you.Hello
· Using internet connection wired or wireless?
Follow these steps:
Step 1:
Updated driver for your network card to the last. Also updated the firmware on the router as well. Follow the steps in troubleshooting section and check if that helps:
How to troubleshoot possible causes of Internet connection problems in Windows XP
http://support.Microsoft.com/kb/314095
Step 2:
Follow the form of measures troubleshooting article and check if that helps.
Windows wireless and wired network connection problems
This behavior is generated by the Manager of Intel wireless cards. This feeder is usually loaded with the Intel Wireless card drivers. If that's the problem, you can try Intel support and check.
-
Start Menu problem - another file opens when I select a file to open in the start menu
original title: Start Menu problem
I use windows Vista Home Edition. The start menu is in Vista Mode. When I select a file the third file above that that I select opens. In classic mode, it works fine. How can I fix it?
Hello
Try the methods provided below and see if they help to resolve the issue.
Method 1:
This looks like a problem with Windows Aero, I would say that you update the card drivers video from the manufacturer's website and check if that helps.
Method 2:
You can navigate on troubleshooting Aero:
http://Windows.Microsoft.com/en-us/Windows-Vista/troubleshoot-problems-with-Windows-Aero
-
How to view the application menu in the app?
Hi all
Does anyone know how to view the application menu in the app?
The ultimate effect is that when you see the user swipe down from the top of the screen, the menu of the application.Thank you very much.
Please check the recent threads or duplicate search before posting questions: http://supportforums.blackberry.com/t5/Cascades-Development/Application-Menus/td-p/1785653
-
Hide/change Application Menu
Hello
I have a language change option (English/Arabic). I want to integrate in the process Menu. But when I click on the application icon, I need to change the text in Arabic and vice versa. Is this possible?
Kind regards
SHA
We can modify / delete the application menu.
Access to the ApplicationMenu with the help of Application: instance()-> menu() and manipulate the menu you want.
-
I used the example provided by LWalker to start application menu to build my app menu. I have that works well with the shot to the bottom of the event to open and close the menu. the question that I can't solve is turning off the screen when the menu is open but still listen to event handler. for example, in the browser becomes invalid app when you open the app menu the rest of the screen and a click event, the menu is closed and then the screen becomes active again.
can you please help me with this or even to show me how you went about creating your app menu because it seems very difficult for anyone starting with blackberry and adobe air development.
Thank you
NR
See here, at the bottom of the page
-
Creating a page by clicking an application menu, then new
Hi, I am wondering how to create a menu of the application page so that after clicking and view of the page, I can go back to the tab of the pane with tabs, I was originally. I know that there is a signal of triggered(). And with the slot method, I create a page every time you click on a menu item. And if I put the page as the scene of the app that I can't go back. How can I do? Thank you.
I just remembered that I have arleady displayed.
-
Move between Pages in the Application Menu
I added an Application Menu, use the example of C++ from here: https://developer.blackberry.com/cascades/documentation/ui/navigation/menus.html
// Create the application menu Menu *menu = new Menu; // Create the actions and add them to the menu ActionItem *actionOne = ActionItem::create() .title("Action 1"); ActionItem *actionTwo = ActionItem::create() .title("Action 2"); menu->addAction(actionOne); menu->addAction(actionTwo); // Set the menu of the application Application::instance()->setMenu(menu);
Unfortunately the example wrong in how to edit a page by pressing action.
Does anyone know how to do this?
bool res = QObject::connect(actionOne, SIGNAL(triggered()), this, SLOT(handleAction1())); Q_ASSERT(res); Q_UNUSED(res);
This method works.
-
Add the element of the phone Application menu
Hello
I want to add a phone application menu item. I m using JDE 4.3.
Help, please.
Thank you
Pankaj
expand ApplicationMenuItem and add it using ApplicationMenuItemRepository.
For example:
ApplicationMenuItemRepository.getInstance (.addMenuItem (ApplicationMenuItemRepository.MENUITEM_PHONE),
new PhoneMenuItem (0)); -
I have recently upgraded to Windows 8 Professional.
A question that I have, is that whenever I try to open a PDF document, it always opens in a new window dedicated, with a totally black background.
Is it possible to open PDF documents on the desktop, so I can see the content PDF, on the same page as all my other apps open?
Under earlier versions of Windows, can I go to the start menu, then select all applications, and they are listed in the form of office, as all my other applications already open.
In Windows 8 Professional, I have not found a way to reproduce this behavior again!
It keeps taking me to a completely different screen. The one who looks like he could have been created for use with tablets.
I hate this behavior on my regular PC and want to know if there is a way to use the old and classic views.
I don't want to open the application menu in a separate window.
So, two questions: 1) is there a way to open the PDF documents in the current working window? (2) is there a way to disable the display of screen separate application and return to the old start menu request window, in the current working window?
On Monday, may 27, 2013 18:15:57 + 0000, n01d3a wrote:
Although I think it's nice that Microsoft has included a program to read pdf files I still prefer the original program, and one that we are probably most familiar with Adobe reader.
Not to argue with you or pretend that you are wong, but I wanted to
offer a different point of view. Although Adobe Reader is the most
popular such program, it is not the only one. It is not one that suits,
in my opnion. I prefer and recommend Foxit Reader, also free,
http://www.foxitsoftware.com/Secure_PDF_Reader/ -
I insert the dreamweaver default start menu. I see the text, but the menu drop-down does not work. See code below
< div class = "container-fluid" >
< ul class = "nav nav-tabs drop-down to the right" >
< class li = "active" > < a href = "#" > home < /a > < /li >
" < li > < a href =" https://order.universitywafer.com "> Silicon < /a > < /li > .
< class li = "dropdown" > < a href = "#" data-toggle = "dropdown" class = "menu drop-down-toggle" > other < class b = "circumflex accent" > < / b > < / has >
< ul class = menu "dropdown" >
< li > < a href = "#" > a < /a > < /li >
< li > < a href = "#" > two < /a > < /li >
< li > < a href = "#" > three < /a > < /li >
< role li "separator" = class = "divisor" > < /li >
< li > < a href = "#" > link separate < /a > < /li >
< /ul >
< /li >
< /ul >
Please let me know what I can do wrong?
Thank you
Chris
I posted my code in the first response. See the forum link below.
Nancy O.
-
option to hide the lack of application menu
I just installed Fusion 8 Pro on a clean install of Yosemite. He added the Menu Applications VMware to the OS X menu bar as before, but now it lacks the option to display always, never, or only during operation. The only thing in the settings of the virtual machine Menu under 'add items to the menu of the application' and 'clear recent applications '.
This is true with an existing VM that I imported as well as a newly created.
Any ideas?
Thank you very much
Aaron
It is proposed to preferences because is not a per-VM parameter, so you can set it up without the need to find a virtual machine that supports the rest of the settings of the Application Menu.
Maybe you are looking for
-
How to change the time of session settings in Mozilla Persona
Hello I wanted to touch base with you on some points that I am using mozilla persona. The two main questions I have are: (1) on behalf of mozilla persona seems to remain active for some time after when you properly sign-in repeat visits to the site y
-
Cannot depend on a Security Center
Original title Security Center: windows vista Home premiumI use an hp pavilion slimline with pre-installed vista home premium. I recently installed Avast free Anti-virus, I do love then I uninstalled and went back to my Microsoft security essentials.
-
Uninstall problems w/HP Officejet 5610 all-in - One Printer
I have a Dell E510 desktop on which I've recently updated my printer to a printer wireless HP Photsmart 7520. I am running Windows 7 32-bit professional, an Intel Pentium 4 3.0 GHz CPU with 4 GB (usable 3.24) RAM. The new printer worked for about two
-
How do you remove user box activated once connected pc and the automatic removal of opening.
Host user forums forums. How do you remove box Switced user when opening the pc and how to remove automatic connected? Please notify. Thank you. Sikki
-
HP 8550n: 8550N printer (how to use tray nr.1)
Hello I'm just wondering how to set up printer so I could print from tray nr1 (I want to use it for heat transfer paper). Now, it seems that the printer using just tray Nr 2 and 3. Thank you Jack