How to use a modal window in titanium? - mobile

i have a serious problem here. i'm trying to use a modal window in my application. till now i used just a window over the parent window. but this caused a problem of not disabling the background.
here is my window:
the problem in the above pic is the background is not being disabled. if i use the modal window it occupies the whole view, which i dont want.
What i'm need of:
i need a view something like this alert view, which wen shown the background goes to disable mode.
any help is highly appreciated..
thank you...

Unfortunately You can not use the modal window as dialog box, but you can do a small trick and make your window look like a modal window.
Create a view and disable the click event on it. Add your dialog window to this view and show this view on screen.
var disableView = Titanium.UI.createView({
height:480,
width:320,
top:0,
backgroundColor:'#000',
opacity:0.7,
touchEnabled:true
});
disableView.add( yourWindow);

Related

When Model popup opens by default .modal-backdrop is applying and monitor screen get disable

I am using Angular js. The issue is when bootstrap model open by default .modal-backdrop class is applying and because of this whole screen get dim and not enable. please suggest me something.
$(".modal-backdrop").fadeOut()
$("#formId").removeClass('.modal-backdrop')
By design a modal is supposed to overtake control of the screen, hence the backdrop.
That being said, you can display the modal without the backdrop.
$("#myModal2").modal({backdrop: false});
https://getbootstrap.com/docs/4.2/components/modal/#options
Angular has configuration as well
config.backdrop = false;
https://ng-bootstrap.github.io/#/components/modal/examples#config
Here is a stackblitz example with backdrop disabled
https://stackblitz.com/angular/aqvnlngdjon

Add a Tool button in titlebar in GTK

How to add a button (tool) in title bar like maximize and minimize button in title bar.
I need to add help tool button in my window title bar..?
Thanks in Advance
You can remove the window manager decoration and place some widgets on top of your toplever window, emulating the same behavior.

How to check if element has class with AngularJS?

I have an off panel menu working perfectly on a site. The user can open and close it using both a navicon or sliding it with the finger.
Right now I have a very nice navicon icon that transitions from Menu Icon to X Icon when is clicked (and opens the menu) and the other way around when is clicked again and the menu closes. Buuut if the user slides the menu open or closed instead of using the navicon, the transition is not triggered, which might lead to confusions on the UX (i.e. the menu being closed, and the navicon showing an X instead of the regular 3 horizontal lines icon).
So, the navicon has right now the following code to trigger the transition:
ng-click="open = !open" ng-class="{'open-mob':open}">
I thought that a nice and easy way to fix this, would be to trigger this "open = !open" every time that the menu is open or closed, as the js from the off panel adds the class slidRight to the main section when the menu is open, and removes it when it is closed.
Being so, is there some straight way to check if the class is there using AngularJS?
Something like if class = slidRight -> "open = !open".
Thanks!!
for those (including me) who could not get their head around Angular's documentation, here is an example which worked for me:
angular.element(myElement).hasClass('my-class');
angular.element(myElement).addClass('new-class');
angular.element(myElement).removeClass('old-class');
hope this help someone ...
Angular uses jqLite's .hasClass() natively.
Read here on the angular docs for more info.
http://docs.angularjs.org/api/angular.element
https://docs.angularjs.org/api/ng/function/angular.element

How to make a window modal to Page in WPF?

I know how to make a Window Modal to a Window
I have a Page as my main window. I want to open a window and make it Modal to the Page. Is it possible? Does Page class have API's to support my requirement? If yes a sample illustration will be nice!!
This is very simple (unless I've misunderstood your issue)
Window win = new MainWindow();
win.ShowDialog();
These links may help:
http://social.msdn.microsoft.com/Forums/en/windowsgeneraldevelopmentissues/thread/3c3e1a4a-6b26-435c-b59b-2e2f1766f52d
Link
​​​

How to make the ChildWindow Fullscreen?

I have a ChildWindow , in which I have a Video Playing in Expression MediaPlayer.
When I press the FullScreen Button then the whole Application switch to FullScreen Mode, but I want only the Child Window to be Full Screen.
A child window can't be made fullscreen. Its a security restriction.
To do this make you form property : MDIChile = true
so you can see your full screen window into you parent window.
got it.

Resources