how do we create tabgroup inside tab in titanium - titanium-alloy

Hello I have basic two tab which is located on bottom side of application. I want to create another tabgroup when I clicked on second tab. I am searching a lot, but only able to add tab in existing tabgroup. My application requirement is when I clicked on second tab of existing tabgroup another tabgroup should be created and it should appears at the top of the same window.please help me to resolve this issue.

I thought you cannot add that.
if you work to develop android apps. do with tabGroup and actionBar or MenuBar
you can search the API here :
actionBar : http://docs.appcelerator.com/titanium/3.0/#!/api/Titanium.Android.ActionBar
menuBar : http://docs.appcelerator.com/titanium/3.0/#!/api/Titanium.Android.Menu

From the api doc for tabgroup
On Android, only one tab group may exist at one time. A tab group may
be closed to allow a new one to be opened later, but the root of the
application must be a heavyweight window to prevent it exiting. Tabs
cannot be removed from the tab group once added, and tabs cannot be
reordered.
On iOS, more than one tab group may exist, and may be opened and
closed as required. Each tab can contain a stack of windows, and the
user can switch between them by tapping the tab's associated control.
Tabs can be removed, and the user may (optionally) be allowed to
reorder tabs.

Related

Start new instance of a project using a button in form

I have a solution that contains 32 projects, one of which is a Windows form and the others are console applications. In the Windows form I have a combo box that its items are the names of the console application projects with a button.
Now, my problem is that how can I start the console application, which name is selected in the combo box by pushing the button, in a new instance? (if it is possible).
In your button click event, add the following lines, assuming cmbConsoleApps contains the file names of the console applications.
System.Diagnostics.Process.Start(cmbConsoleApps.Text);
More information about executing applications:
https://msdn.microsoft.com/en-us/library/h6ak8zt5(v=vs.110).aspx

Flex tab navigator truncates the labels

I have a flex application which has 5 tabs from our application and 2 other tabs will be rendered from the other application at run time . We maintain a permissions database to render the tabs to a particular user. For eg: a user User1 logged in has the permissions only to view first 4 tabs then the other 3 tabs would be removed from the tab navigator by checking the permissions. The problem is when the first 2 tabs are removed from the permissions the remaining tabs displayed are shown with the labels truncated. I tried searching the Google but they have answered is only for the static tabs. Here tabs are rendered dynamically based on the permissions provided to the user. I cannot use the creationComplete method on tab navigator because I'm adding the other application's 2 tabs after creating it and these two tabs were unknown to that method of tab navigator. Any help would be appreciated.
Earlier I was using fl:SuperTabNavigator now moved to mx:TabNavigator.
this solved the problem

Drop dialog on a list page not disappearing automatically

When I add a drop-dialog to a list page, the drop dialog drops down when I click on it, but does not disappear when I click somewhere else.
I am trying to add my own drop-dialog, but I can reproduce this issue with standard Dynamics AX objects. I guess I am just missing some property on an object, but I just cannot figure out which one.
If you want to reproduce my problem in order to solve it, do the following:
Create a new Form. (Form 1)
Change the FormTemplate property to ListPage (Click on Yes)
Add the query MainAccountListPage to the DataSources
Create an ActionPanTab.
Add a Drop-dialog button with the menu item MainAccountListPageBalanceParameters.
Save and open the new List page by right clicking and choosing open. (or open the menu item)
In my case, when I click on Parameters, the drop dialog drops down. When I then click outside the drop-dialog, it disappears as it should.
Create a new display menu item. Set the object to the new list page (Form 1)
Drag the Menu item to any menu. I added mine to General ledger (Common)
Restore, open new workspace. Click on the new menu item in the general ledger menu.
Click on “parameters” and click outside the drop dialog.
When I do this the drop dialog does not disappear again. You can see this same drop dialog working fine on the Main Accounts list page. I have tried changing properties on both menu items, on the menu, on the form etc. I have tried different drop dialogs and different list pages. It always works on the details page and when opened from the AOT.
Am I missing a property? Is the entire way I am adding the drop dialog wrong?
The answer to the above example is.. add the MainAccountDetailPart Form part to the list page's (Form1) Parts.
With my other example, EcoResProductPerCompanyListPage, I had to add the EcoResProductVariantsPerCompanyFactBox to Parts.
I have no idea why this is, but adding a part to a list page fixes the drop dialogs. For example, adding MainAccountDetailPart Form part to a new list page not only fixes the MainAccountListPageBalanceParameters in my example, but it also fixes any other drop dialog that previously did not want to close. Removing the part the breaks all the drop dialogs in the list page again.
Thanks, FH-Inway, for the suggestion, I would have never have found the answer without your method. The solution really surprised me!

open new tabs on NavBarItem clicked in Devexpress

I'm developing some Windows forms app with Devexpress, and I have something like below, a set of tabs are open which are related to "System parameters" and I want to a new set of tabs to open in place of older tabs when I click on Error navBarItem and also it should be vise versa, I saw this in demos but I don't know how to do it myself, thanks
I suggest you use a UserControl for each set of options, and when you click on an item of your navigation bar, you do the following :
Set the visible property of the current user control to false
Check if the user control associed to the clicked item exist, if yes, set it's visible property to true (reactivate it), otherwise, create an new instance of it, and dock it.
To manage this, you should have a a list of the user controls already opened, so you can reactivate them when needed.
This link may help you :-)

Show alert if moving on without saving in Flex?

Functionnaly :
On one of my components of my application, I have an editing/lock system. When a user starts editing, he locks the file so other users cannot edit it.
Problem scenario : When the user activates "edition mode" and leaves screen, I would like to show a alert with two options : save changes, or discard changes.
There are different ways to exit screen :
There is a List on the left side containing other possible editabel data. A click changes the data in my component.
There is a menubar on top leading to other screens.
The edition component is embedded in a Tab navigator. When changing tabs, the alert has to show.
Closing browser.
Do I have to catch all of these events and plug at all those places?
Is there any kind of focusout mecanism?
The answer to the first question is: YES.
You need to watch all possible exit events that could harm the currently edited data.
Well, the problem is now how to manage this properly. Using an MVC framework you would trigger the appropriate commands from your components:
CHANGE_LIST_ITEM (new item)
CHANGE_TAB (new tab)
CHANGE_SCREEN (new screen)
Each command then checks if the currently edited tab has been saved or not. If not, it displays the Alert. Else, if there are no changes, it allows the list, the screen chooser and the tab bar to continue.
So your components (list, screens, tabs) need to implement some kind of rollback or preventDefault mechanism. Generally, changing their state must be allowed by a central validator (in MVC the command).
In the case of the list: I would suggest that the list is not selectable by mouse click but only programmatically. You set a listener on the list item click event. If the command allows setting of a new item it will notify the list. In MVC usually by sending an async message that gets received by the list's mediator. [[And even more correct: The command would set some model properties (e.g. currentListItem) and the model than sends an async message.]]
Edit: For the browser close event, you need to call a JavaScript expert.

Resources