XUL: How to edit popup's position - firefox

i'm developing a simple Firefox Addon: a button with popup shown with a classical mouse over event.
Does someone know if is possible set the position of the popup ?
Ex: top left instead bottom right
Thanks

Did you take a look at this?
Also take a look at positioning popups. It also has an example.

Related

Getting Right position of MasterDetailPage Xamarin

I created a custom hamburger with its own animation. I wanted to know if there was a way of attaching it to the rightmost side of the MasterDetailPage's sliding menu so that it moves when it is pressed? Is there any way to get that value or at least a value to do with the animation of that page so that I can translate it accordingly
What you need is accomplished through using the "RotateYTo" method and it works also on MasterDetailPage.
Try the following in your MasterDetailPage initiation.
this.RotateYTo(180);
this.Master.RotateYTo(180);
this.Details.RotateYTo(180);
Edit:
It looks like I got your question all in a wrong way.
Anyways. If you need something to appear right next to the Master Page you should add it on the left side of the Detail page. The Master page also takes a width parameter which you can manipulate.

Collapsed PanoramaItem briefly appears when swiping

I have a weird experience when using a panorama control on 7.1... I'm trying to toggle the visibility of a PanoramaItem programmatically. But while it works fine and the PanoramaItem toggles (i.e. PanItemA is hidden, while PanItemB is shown) , the hidden PanoramaItem reappears briefly while swiping right (from first item to last).
I have no clue how to solve it.
Any help is much appreciated.
Thanks!
It's not good idea show/hide Items for Panorama.
Try remove/add them instead.

dojo Show/Hide One ContentPane While Another ContentPane Is Liquid

I've been struggling for weeks trying to crack this nut so I'm not sure if it's impossible, or if it's my lack of coding chops... or both. I'm not a programmer and I'm a newbie to Dojo Toolkit.
I have a site using the BorderContainer layout. I'm trying to create an effect where I can use a button to open and close a dropdown type box that will contain controls. I need this dropdown to be hidden on page load, and then open when you click the button.
My problem is that when I open the dropdown, it pushes the content pane below it off the bottom of the browser window. I need the lower ContentPane to stay fit within the remaining space of the browser window when the dropdown opens. Additionally, I want the dropdown to sit outside of the scrollable container for the content below it, which is why I have it set up to sit outside a nested BorderContainer below it.
I've created a simplified version of the code to demonstrate my challenge (see link below). If you load the page you can see the center ContentPane scrolls the content. But, if you then click on the button, a dropdown div expands above the content. Then when you scroll, you'll notice that you can't see the full pane because it's in no-man's-land below the bottom of the browser window. I assume that because the div is set to display:none on load, it's size is not accounted for on page load. Then, when you open it by pressing the button, it's size is additive and the pane below doesn't know how to resize or account for the new element.
I've tried using the visibility attribute, but that leaves a gap for the div when it's still closed. I've tinkered with some code that controls the height that shows promise, but each of my dropdown boxes will be different sizes so I'd prefer that the height be set to "auto" rather than a specified pixel size.
Does anyone have any idea how I can accomplish this so that the lower pane will fit in the space without pushing off the screen?
Here's a sample of the page:
http://equium.com/scaffold.html
(I had some problems trying to insert the full HTML page here as a code sample so if that's a preferable way to handle it, and someone can let me know the best way to embed all of that code, I'd appreciate it.)
Thanks is advance, I'd really apprecaite anyone's feedback.
You might want to take a look at dojox.layout.ExpandoPane (though be warned I think it has only worked properly for top and left regions for a while).
Also, I'd suggest simplifying/altering your layout a bit. See example here:
http://jsfiddle.net/taFzv/
(It'd probably need some tweaking to get exactly what you want.)
The real issue you're having is probably that the BorderContainer has no idea that parts of the view resized. ExpandoPane takes care of that by telling the BorderContainer to re-layout after its animation completes.
It works under IE8.0. When dropdown box open, just keep pressing mouse from page and drag to bottom, you could see the content was pushed to out of page. It looks the browser could not detect it and could not add it to "scroll bar" account.
I would suggest taking out all BorderContainers except your top level one, the one with mainPage as the id.
Place your {stuff here} div into the mainPage BorderContainer, after the ContentPane with the Close/Open button. Make sure you make it dojotype dijit.layout.ContentPane, set up layoutpriority, and set region to top. Set the height to 0/x when clicking the Open/Close button, instead of setting display.
Try your page again. If that doesn't fix it, you probably need, a call to layout, resize, or both to indicate to the BorderContainer that it needs to evaluate all its children and size the "center" pane properly. Something like dijit.byId("mainPage").layout(); Do this any time someone presses the Close/Open button, after you have changed the height of any BorderContainer children.
Maybe the dijit.form.DropDownButton would fit your needs. When click the button a tooltip is displayed that can be filled with any content you want. Just as you specified, the dropdown tooltip is only displayed when you click the button, and it doesn't mess with the underlying layout at all. The tooltip sits "on top" of the page.

Windows Phone 7 - Move Content above Keyboard

I have page containing 4 textboxes and a button. The content is within ScrollViewer. When user goes to the last textbox, the button below it is 50% visible. So, to click it, user has to click on non-focusable area to hide the keyboard and then click on button.
Is there any way to move the ScrollViewer up? Or move the content up so that the button below focused textbox can be seen 100%?
The solution is to remove the buttons on the page and replace them with buttons in the ApplicationBar as this is always viewable below the SIP.
If this is not a solution you can implement (from a design view-point there is no reason to not do this but sometimes these decisions come from elsewhere) then you could look to use the ScrollToVerticalOffset method to try and bring the desired item into view.
I would suggest you read Alex Sorokoletov's article on how to transform the view. It might be of help for your problem.

Sticky XUL toolbar button

As I can see, addon-bar in FireFox 4 is a toolbar and close icon is a button. And despite the fact that toolbar is customizable (customizable="true") it is impossible to remove that button or even move it to another place.
How is it done?
I think if you overlay the element directly on to the toolbar (rather than the toolbarpalette, which is what you normally do) then you won't be able to move it unless you set the removable="true" attribute on the element.
You can remove the button (I haven't tried moving it around).
I used Dom Inspector addon: https://addons.mozilla.org/en-US/firefox/addon/dom-inspector-6622/
Notice that close button is gone on the screenshot.
I did this manually through Dom Inspector - added that attribute hidden = true. Your button id is addonbar-closebutton so from chrome (chrome overlay) you should be able to do something like: document.getElementById('addonbar-closebutton').hidden = true. This is off the top of my head so maybe it isn't the most accurate but should be simple as that.
If you want to move it I suppose you can try reordering children, or mess with styling, that toolbarspring I think is keeping it on the left and the rest of it on the right.

Resources