I am developing a Firefox addon. I need to create two buttons which exactly looks and operates like back and forward buttons. But the difference is I need to put my own icon inside them. I am completely blank. Any directions will be really helpful.
[Edit]
I am asking for creating two buttons with the look and feel of back/forward button(Although there are two buttons, it seems like one) in the latest Firefox on windows environment.
Thanks.
It's really easy to add your own Image to toolbar buttons. Read these links you'll have your answer & don't forget to link your images for the buttons in CSS file.
https://developer.mozilla.org/en/XUL_School/Adding_Toolbars_and_Toolbar_Buttons
https://developer.mozilla.org/en/XUL_Tutorial/Toolbars
https://developer.mozilla.org/en/CSS/-moz-border-image
https://developer.mozilla.org/en/custom_toolbar_button
https://developer.mozilla.org/en/XUL/Toolbars/Creating_toolbar_buttons
For example:
<window id="main-window">
<toolbox id="navigator-toolbox">
<toolbar id="xulschoolhello-toolbar" toolbarname="&xulschoolhello.toolbarName.label;"
accesskey="&xulschoolhello.toolbar.accesskey;"
customizable="true" mode="icons" context="toolbar-context-menu"
defaultset="xulschoolhello-hello-world-button"
insertbefore="PersonalToolbar" />
</toolbox>
</window>
CSS File:
//LInk you image here//
toolbarbutton.xulschoolhello-toolbarbutton,
window:not([active="true"]) toolbarbutton.xulschoolhello-toolbarbutton,
toolbar[iconsize="small"] toolbarbutton.xulschoolhello-toolbarbutton {
list-style-image: url("chrome://xulschoolhello-os/skin/toolbar.png");
}
Related
I have a link on my page that is simply a back arrow. I put the icon directly in my element, like this:
<i class="fa-solid fa-arrow-left"></i>
but on the page it's as if they follow each other. The clickable area is before and above my icon. I tried to replicate here. (not sure the icon shows up properly, but the problem is reproduced)
I saw in another post that adding a target fixes the problem for some, but it didn't for me.
Does anyone have an idea?
I fixed it by playing with the width of my anchor element.
I think this is going to be a pretty simple question for most of you.
I am using this code I found here on a previous question asked awhile ago:
Here is the code:
http://jsbin.com/Amejum/2/edit?html,css,output
Here is the question:
Show hide divs on click in HTML and CSS without jQuery
The code works great. I just wanted to be able to do one more thing, not sure if it is possible. Is there a way using only HTML and CSS only to make the label text (in the example it is "Collapse 1") disappear after being clicked? Or changing its color after being clicked?
Thank You.
I have been developing mobile apps within Flex for a long time now and this issue is really annoying. I have an application that I want to use with the Split View Navigation. So when the App is in Landscape the menu will be on the left of the split screen and when in portrait it will appear as a button at the top.
I have gone through the exact steps as I know them on how to achieve this. Below is what I have in my Default Package File:
<s:states>
<s:State name="portrait"/>
<s:State name="landscape"/>
</s:states>
<s:SplitViewNavigator id="svn" width="100%" height="100%" autoHideFirstViewNavigator="true">
<s:ViewNavigator id="leftNav" width="310" height="100%" firstView="views.Menu"/>
<s:ViewNavigator id="rightNav" width="100%" height="100%" firstView="views.Home">
<s:actionContent.portrait>
<s:Button id="NavButton" label="Menu" fontSize="15" click="svn.showFirstViewNavigatorInPopUp(NavButton)"/>
</s:actionContent.portrait>
</s:ViewNavigator>
</s:SplitViewNavigator>
however when I use this code and the app is in landscape I can still see the menu button in the right pane at the top, whats even stranger is if I click this button when in landscape the right hand section will expand to fill the screen and the menu will go into the pop-out box.
Is there something I am missing here or something else I have to set as have tried about 20 different approaches with no luck and its sooooo frustrating? Thanks in advance :-)
I know this is an old question, but it's something that happens to a lot of people!
So the solution is actually very simple, just add visible.landscape="false" to your button and you're done, so you'll end up with the button tag like this:
<s:Button visible.landscape="false" id="NavButton" label="Menu" fontSize="15" click="svn.showFirstViewNavigatorInPopUp(NavButton)"/>
I see on you comments that the states are changing when device rotation is changed, but if for some reason this isn't working, you could add a resize event handler to your application (or view) and then do something like
protected function resizeHandler(event:ResizeEvent):void
{
if( width > height ){
currentState = "landscape";
}else{
currentState = "portrait";
}
}
Again i know you may probably already have solved this, but maybe it'll help someone else!
I have a registration form on my layout grid, made out of a stackPanel. Textboxes are taking most of the screen (800px) along with a button. When user is positioned in one of the text boxes, keyboard covers almost half the screen and in order to access boxes below, they first have to click somewhere blank to remove the keyboard and then click another box. It isn't possible to scroll down.
I want to enable same behaviour like when editing name in contacts, but didn't manage yet. How to achieve this?
Try wrapping it into a ListBox or a ScrollViewer (probably easier), like so:
<ScrollViewer>
...
</ScrollViewer>
Also, check to make sure you don't have the same problem described here.
I'm not a WP7 developer but here's what I do in Android and iOS and you may get a hint of what to do.
I wrap my forms in a Scrollable View. This gives easy scrollable features to users without the need of anything else.
I can't seem to figure out how to make my toolbar items look like buttons. Some examples of what I'm looking for are the toolbar items in Mail, Safari and Transmission. Are these buttons just simple images, or is there a setting somewhere I'm missing?
They are NSButtons or NSSegmentedControls. Just drag one right into the toolbar from the IB palette.