button

Android. How do I set all buttons clickable or unclickable at same time using setClickable?

The screen displays four buttons. When a button is pressed, a media player plays a sound. The problem I'm having is implementing setClickable for all buttons at the same time. Once a button is clicked, I want all buttons to be unclickable until the media player is finished playing the sound associated with the button click. Then I want ...

Android / Styling a Button: Background also behind Drawable left and Drawable right

I am styling a Button whose width can change in the program through different Content. I got the png files from the designer like this: [Left Border] [Background (just a strip with the gradient)] [Right Border] I thought I'm fine with assigning the Properties of the Button like this: Background: Background.png Drawable left: LeftBor...

How to enable button to work in Android 2.1

Hi guys, I am a beginner in programming with Java Android. I am currently confused with how to enable button to work in Android 2.1 My current project requires a lot of different activities to work together in one program. Let's say I have abutton inside the main.xml and assume the function inside ButtonAdroid.class is the one below: ...

Android Open Menu from a button

Is there a way for a button to call a submenu? I currently have a menu where if they select one of the options it opens a submenu, however I want to be able to start the submenu from the Button widget instead of the Menu object. \ Thanks! ...

Defaulting Column in SharePoint DataView Insert Mode to a QueryString Parameter

I have a SharePoint Dataview with a Querystring parameter. I am able to use the Parameter in a Datasource filter. I've enabled the New button and it works. There is a column in my view that is required. I really don't want to display it in my DataView, but must. When I select Insert, the column (a lookup dropdown), comes up. I'd l...

Buttons bellow ListView are not fixed to the bottom of the screen when the ListView is empty

I have a Layout which contains a ListView some buttons below it. What I want is for the buttons to be fixed to the bottom of the screen. When the ListView has several items (more than what fits the screen) the code is working properly and the buttons appear in the bottom of the screen. However, when the ListView is empty or does not r...

iPhone SDK 4 - How to programmatically detect volume hardware button press?

How would you detect if the user presses the volumen hardware bottons and prevent default behaviour? Thanks a lot. ...

how to use a rubber band (rectangle) to capture multiple controls(buttons) on a flowlayout panel in C#?

Hi I'm having trouble to select multiple buttons on the flowlayout panel any idea how to solve it? ...

Set a button background image iPhone programmatically

In Xcode, how do you set the background of a button as an image? Or, how can you set a background gradient in the button? TIA, Linda ...

Cant stop a while loop with a button

Hello. Im trying to write a program which moves the mouse every 3 minutes (to stop a screen saver coming on) but I want to be able to stop and start it at will. As you can see below I have create the buttons and method but when you click run it steps into the while loop and because its in effect an infinite loop it won't look and see if...

Catch a Spinner selection with a Button?

Hello! As the title says, i have a Spinner with just a couple of options and a button. I didnt declared any Listener for the spinner, instead of that, what i want is use the button and perform different actions depending on the spinner selected option. So, i declared a handler in the button option "android:onClick", but once there, i d...

CF - Button when pressed receives a focus (bold border)

As the question is asked ... how can i prevent that from happening? I have ZOOM IN and ZOOM OUT button that receive focus after pressed. The button in CF does not have focus property so im guessing im required to do another painful workaround... Any ideas? ...

Most robust CSS-only button solution?

What's the best, most robust CSS-button definition? Ideally, I'd like gradients, rounded images, and graceful degradation down to IE8. It would also be great if the buttons didn't use any images, and the buttons scaled horizontally to fit their content. What's the best solution to this? ...

Apply Different Style to Button When Pressed

Is there a way to apply a style to a button when the button is pressed? If I have a style in style.xml: <resources> <style name="test"> <item name="android:textStyle">bold</item> </style> </resources> a selector in button.xml: <selector xmlns:android="http://schemas.android.com/apk/res/android"&gt; <item android:...

How to do simple hover button using 2 images in Silverlight

Preferably without using backend code? I'm looking for the cleanest solution for doing a fade in fade out hover button using 2 images. Here is what I have so far Edit: I got this to partially work.. problem is now that the mouseout seems abrupt whereas the mouseover seems fine, what am I doing wrong? <VisualStateGroup x:Name="CommonSt...

Find all instances in a currentFrame (AS 3.0)

I have a movie with several imported videos which are instances of FLVPlayback. I want to make some Pause and Play buttons. Thus I need to know which video should I refer the stop() method to when I'm in a certain Frame. I believe it is something related to finding all existing instances in this.currentFrame and stopping the found instan...

Android onClick method

I have two onclick method in android project clr=(Button)findViewById(R.id.Button01); clr.setOnClickListener(new OnClickListener() { public void onClick(View v) { tv1.setText("CLR"); et1.setText(""); refrigerant = ""; pres = ""; temperature = ""; ...

Android: How to put text underneath a Button?

I have... PNG file for Background PNG file for Icon (drawableTop) Text I want to put underneath this Button It's similar to a Menu Icon. How to do that? I only found following ways. Both of them arent very nice: Make two Buttons, one for Text one for the Picture The Background PNG File needs a transparent area at the bottom in the ...

How do I disable a jqueryui button.

When I click on a jquery ui button, it still triggers the click event callback. How do I block that event? Do I have to manually keep track of the state or does jquery ui take care of that for me? ...

Can button_to generate html5 <button>?

Rather than <input type="submit" /> I want to output <button> using the button_to method (rails 3.0.0) Is this possible? ...