Popup flex window - apache-flex

When I click the button, it should popup my module, when i click outside it will hide or remove it. This is the code I have:
private var Showup:IFlexDisplayObject;
Showup = PopUpManager.createPopUp(this, samplemodule, false);
Showup.addEventListener(FlexMouseEvent.MOUSE_DOWN_OUTSIDE, Removewindow);
private function Removewindow(e:FlexMouseEvent):void
{
PopUpManager.removePopUp(Showup);
}
My problem is, in samplemodule I have lot of buttons. When I click any button the corresponding module should load to middle portion.. but it does not load.
Please tell me the mistake or an alternative option!

Please add
mouseDownOutside="PopUpManager.removePopUp(this)"
tag inside you samplemodule (Popping canvas) main Display object as tag.
This will remove the popup when you are moving outside the popup and clicking.

Not quite sure what you are having trouble with, the close or the centering of the popup. I think it is the centering. If so, try adding:
PopUpManager.centerPopUp(Showup);

Related

Right click menu css

Basically I just wanted to know how to change the looks of the right click menu using css. I haven't tried anything because I have no clue were to start.
Thanks in advance
unfortunately, you can't change the right click menu style using CSS, but you can disable it and create one from scratch using HTML, CSS and Javascript
you can handle the right click event (context menu event) by adding this code:
document.addEventListener('contextmenu', function(e){
e.preventDefault();
});
This part e.preventDefault(); will disable the default behavior of the right click and the context menu will no longer appear, now you need to add a function and new style for your styled context menu
If you are still not sure how to make this here's a tutorial for the complete thing you want to achieve https://www.sitepoint.com/building-custom-right-click-context-menu-javascript/

Xamarin form Navigation page back button not displaying

I need to add a back button to my navigation page. I tried NavigationPage.SetHasBackButton(page, true); but it didn't work and I tried in xaml also, still does not work. Can anybody help me?
Your code isn't right. In App.xaml.cs you need to set Main page to be new NavigationPage(new ProductDetail());
Then when you navigate away from ProductDetail, you will see the back button.
Also normal page navigation will use PushAsync. Are you wanting a modal popup for your second page?

how to disable parent window in asp.net using javascript

i hv an asp.net form in which i have used master page, in this by clicking on one link button a popup window will be opened, my problem is i want to close a popup child window when parent form is closed.. or i should make parent form disable when child popup is active...
i got some code but its working only for IE,, please help me to work this in Google chrome
this is my code which is working For IE
in parent window i wrote like this
function topWindow() {
var popup = window.open('BranchSearch.aspx', 'mywindow', 'location=1,width=450,height=100,toolbar=0,menubar=no,resizable=no,scrollbars=no,status=no,left=340,top=340');
popup.focus();
}
and in body tag of child pop window i wrote like dis
please help me as soon as possible
thank u
You can use window.showModalDialog This will disable parent window until you close the child window.

Setting the Panel Owner

I've got an application that allows a panel to popup to allow the user to edit some properties.
How do I set the panel owner so that it is on top of all the other components on the page without actually disabling them like you do with an alert box?
Use the PopUpManager to display something on top of everything else. I used a function like this to create the Popup before:
protected function createPopUp(className:Class):void{
var win : IFlexDisplayObject = PopUpManager.createPopUp(Application.application as DisplayObject, className, false) as IFlexDisplayObject;
PopUpManager.centerPopUp(win);
}
You can see it in action with the Flextras Calendar API Explorer. Click any button on the top bar.

jQuery UI Dialog cause page jump on open & close on ASP.NET

I have an ASP.NET C# page, with image thumbnails in it.
I created a script that opens a jQuery UI Dialog on each hover on a thumbnail that shows me the thumbnail in larger size in a dialog view, and when I hover out - dialog closes.
My little annoying problem is, that in every mouseover (trigger dialog to open) - the page makes itself 'longer' - a scrollbar appears on the side of the browser, and it seems like the page gets longer when a dialog is openning, but it shouldn't do so.
When I hover off (mouseout) - the dialog disappears and the page returns to its normal state.
Because of this- when I hover through the thumbnails, my page 'jumps'.
I looked for a solution for this, and I've added return false; for each dialog open, and close - and it still doesn't make any different.
Sorry for the unperfect english, and thanks for all helpers!
I finally got my solution - for all interested:
open: function(event, ui){
/*
* Scrollbar fix
*/
$('body').css('overflow','hidden');
}
I added this to dialog's opening event and it fixed the issue!

Resources