Re: sharing xul elements between toolbars
Neil <[email protected]>
| Newsgroups | gmane.comp.mozilla.devel.xpfe |
|---|---|
| Message-ID | <[email protected]> |
Nikhil Johny wrote: >i meant that the functionality of the button in toolbar_2 is same as the toolbar_1. but the styling might be different. so its actually the same button but slightly different. the example i provided is just a example. here the real problem: > >i want to create a toolbar in fullscreen mode. it will contain the back and forward button just like the normal view(defined in browser.xul) but i would like to style it differently. also there is some other features like a url bar with a smaller width. so i would need to use the same url bar as the normal view but i would need to change css to give it a smaller width. > >how to achieve this? is this possible using the DOM? > > This is sometimes possible for a regular button (or indeed, a single menuitem). Often these items have a very simple action, and if you are lucky the action is delegated to another element, called a command or broadcaster. Therefore all you need to is to create your own custom button and designate the same command/broadcaster and that will often be all you need to clone the behaviour. However I don't think this is possible for more complex objects like the URL bar. Instead what you could consider is to change the styling of the existing elements in full screen mode. (This includes overriding the hiding of the navigation toolbar in full screen mode.) It might even be possible to do this entirely in CSS. -- Warning: May contain traces of nuts.