imagebutton

Disable ASP.NET ImageButton in non-IE Browsers

I have an <asp:ImageButton /> which has its enabled property set to false. This works in Internet Explorer, the button is not 'clickable', but in other browsers you can click it. However, nothing happens when you click the imagebutton in these other browsers. How can I disable the ability to click the button in browsers outside of Int...

ASP ImageButton OnClick coordinates

I have an ASP.Net ImageButton in .Net 3.5. It's a large image, 450x700 that users can click on. On the server side, the OnClick event handler does some stuff based on the coordinates that the user clicks. It's a basic map, just a single static image, that users can click on. It works great, except when, in IE, the user is at a zoom l...

Relative paths issues for ImageButton / LinkButton

Hi I have recently migrated from .Net 1.1 to 3.5, and none of my ImageButton's or LinkButton's work. Not only do they not show the image, but when pressed, they redirect back to the root of the site; and the 'onClick' EventHandler doesn't fire. E.g. If I click an ImageButton on the page: http...../MyWebsite.ecom/Project1/frontend/...

ImageButton title tag

On an ImageButton using the AlternateText attribute renders an alt tag to the browser. <asp:ImageButton ID="imagebuttonStuff" runat="server" OnClick="imagebuttonStuff_Click" AlternateText="Make Stuff Happen" ImageUrl="/images/icons/stuff.png" /> <input type="image" name="imagebuttonStuff" id="imagebuttonStuff" src="/images/icons/stuff....

How to make ImageButton in Android automatically scale based on screen density?

I have an image put on an ImageButton, which looks good on a mdpi (medium-dpi) screen. However, when the device has a hdpi (high-dpi) screen, the image is still pixel-by-pixel accurate, which look small on the device screen. How do I make such that the image (and therefore the ImageButton) scaled based on the density-independent pixels...

Usercontrol's Imagebutton - user multiple click issue

My usercontrol has the panel , which encapsulates collection of controls and imagebuttons. [Submit] is the imagebutton, that has server side click handler and client event handler as well, to disable the button, as soon as the user, clicks. For some reason, the client event handler is not invoked with certain kind of users. I am not abl...

Android: How do I switch the image of an ImageButton when the user releases the button?

I'm trying to make it so that as long as a user is touching the button, it shows one image, and when the user releases the button, it goes back to a default image. I'm trying to use a selector to make this happen: <?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android"&gt; <item and...

How do I set the selected state of an image button with xml

I have an image button as defined below. <ImageButton android:text="Play" android:src="@drawable/playpause" android:background="@drawable/opaque" android:gravity="center_horizontal" android:id="@+id/player_ctrl_btn" android:layout_width="fill_parent" android:padding="0px" android:layout_height="wrap_...

show Select URL box for ClickImageURL in Custom ImageButton

Dear All, I am making a custom ImageButton Control which has the option to show button clicked effect by adding onmouseup and onmousedown javascript code to change image URL. I have constructed the control and it has a ClickImageUrl to set the URL of image to be shown when button is clicked.. i wanted to know is there any way i can add...

Android: How to prevent image from being scaled in ImageView or ImageButton?

Hi, How can I prevent my bitmap from being scaled automatically in an ImageView or ImageButton if the view or button is stretched using "fill_parent" or using "weight"? This will be useful, for example, to create a 4-button toolbar at the top of the screen where the buttons are equally spaced, but the images inside the buttons keep g...

Multibinding File-Paths into a Button ControlTemplate

I am trying to develop an application that uses a number of images that are stored in a seperate remote file location. The file-paths to the UI elements are stored within the Application Settings. Although I understand how to access the images from Applications Settings using a MultiBinding and a value converter, I'm not sure how to inte...

Translate ImageButton from C# to XAML

I worked out the C# code to create an ImageButton (below) that has three images (one base-image and two overlays) and three text boxes as the face of the button. I am inheriting from the Button class, which unfortunately includes several components that I didn't realize would surface until after coding and need to remove, namely the bri...

Borderless ImageButtons in WrapPanel

I am attempting to create a WrapPanel with seamless ImageButtons containing Artwork. I put together the following ContentTemplate in the hopes that it would provide the seamless look required; however a thin white-line remained around each of the buttons. Can anyone steer me in the right direction? <Button.ContentTemplate> <DataTe...

Visibility of Class field-data of Mouse Clicked ImageButton located within WrapPanel

I am attempting to obtain class-data associated with a mouse-clicked ImageButton; which ImageButton is located within a Scollviewer wrapped WrapPanel and filled with numerous other ImageButtons. The problem is that although I can see the instance of the ImageButton selected "((PlanetClass)(fe))", and have visibility of the class instance...

Do FormViews not respond to commands issued from an ImageButton?

I am using ImageButtons in place of LinkButtons in a FormView to issue New/Edit/Delete/Cancel commands, but they don't seem to have an effect on the FormView. The ImageButtons will cause a postback but the FormView mode doesn't change from the current mode. I'm sure the ImageButtons were working at one point, but I've been busy with ot...

Accessing ImageButton Contents

I am representing a Solar-System's planets with ImageButtons that show the planet's image on the surface of the button, and hold the planet's important data.. name, distance from sun, etc within an instance of a Planet class, stored within the ImageButton.Content property. When the ImageButton is selected, I am attempting to access and ...

Android ImageButton with a selected state?

If I was using an ImageButton with a selector for its background, is there a state I can change which will make it change its appearance? Right now I can get it to change images when pressed, but there seems to be no "highlighted" or "selected" or similar state which lets me toggle it's appearance at will. Here's my XML, it only changes...

How can I change the images on an ImageButton in Android when using a OnTouchListener?

I have the following code which creates an ImageButton and plays a sound when clicked: ImageButton SoundButton1 = (ImageButton)findViewById(R.id.sound1); SoundButton1.setImageResource(R.drawable.my_button); SoundButton1.setOnTouchListener(new OnTouchListener() { public boolean onTouch(View v, MotionEvent event) { ...

Android widget ImageButton loses image when screen is rotated

I have a widget on my home screen with several ImageButtons which have default background images. Through the configuration activity, I can change the image on any of the ImageButtons. The problem is that when the screen is rotated, the image on the ImageButton disapears and it changes back to the default image. I don't know why this ha...

Add Imagebutton to DataGridView in C#

I am trying to do a simple 'Delete Row' button in a DataGridView that I have, but the problem is that I would like it to be an ImageButton rather than a simple Button. Currently I have it setup to be a ButtonColumn, but have seen no possibility for changing it from a simple button with text to a button with an image on it. I know this ...