Questions tagged [imagebutton]

An image button is a button that displays an image, regardless of platform

An image button is a button that displays an image, regardless of platform

1801 questions
5
votes
7 answers

Error No resource found that matches the given name (at 'src' with value '@drawable/button1')

I thought the book had incorrect code. Tried at my home location and it worked. Found out that my eclipse was actually broken. Had to remove and re install eclipse. This is my first post here so if I didn't follow some of the rules please let me…
ZeroAccess
  • 171
  • 2
  • 3
  • 14
5
votes
1 answer

Inno Setup: TBitmapImage isn't showing up

I want to add custom designed buttons to my Inno Script with the TBitmapImage class. My Inno Setup script is compiling just fine but the bitmap isn't showing in the form. I looked into any possibilities but can't seem to find the error I made.…
timonsku
  • 1,249
  • 2
  • 21
  • 45
4
votes
3 answers

How to change image button transparency programmatically?

How to set the transparency of the image button programmatically in android? I am creating dynamic image buttons on the fly.
ssk
  • 9,045
  • 26
  • 96
  • 169
4
votes
2 answers

Change background position/gravity in ImageButton

I have the next view: And I want it to look like this: In the first one, the background of the green ImageButton is in the top-Left corner. And in the second, the background of the green ImageButton is in the center. (The background image is in…
Ryan White
  • 63
  • 2
  • 6
4
votes
1 answer

Detect PHP image submit button click

Have a php form with an image for the submit button. Am trying to determine whether the submit button has been clicked when the page posts back. Have tried $testForm = 'fail'; if (isset($_POST['btnSubmit'])) { $testForm = 'Submit…
HuwD
  • 1,800
  • 4
  • 27
  • 58
4
votes
2 answers

Android Get dimensions of Image in ImageButton

Is there a way to get the dimensions of the image currently set in the ImageButton? I'm trying to achieve this. I have a ImageButton with a default pic of 36 x 36. I then select an image of size say 200 x 200. I wanna call something…
Maurice
  • 6,413
  • 13
  • 51
  • 76
4
votes
1 answer

Android: Add outer glow to ImageButton

I have been looking at these posts: StateList , Different states What I really want is to add an outer-glow or some way to highlight the button onclick versus making different images for the associated states. Is this possible using colors or…
Nick
  • 9,285
  • 33
  • 104
  • 147
4
votes
1 answer

ASP.NET - Event handler of programmatically-created button never invoked

So i need to write simple "Minesweeper" game in asp.net (Only for learning purposes - it should be almost only javascript but anyway...) I'm creating the game board dynamically at PageLoad, by creating a Table when each TableCell contains an…
Avi Shukron
  • 6,088
  • 8
  • 50
  • 84
4
votes
2 answers

Android programatically set margin to ImageButton in TableRow

I have defined a TableLayout in my Java code. For each row, I'm displaying three ImageButtons. When one of those buttons is pressed, the background color changes. To display it nicely, I have set a padding of 10px. The problem I'm having now is that…
Hannelore
  • 183
  • 2
  • 2
  • 6
4
votes
2 answers

Deleting multiple selected items in custom listview dosn't work with ImageButton

It's very necessary for me. I am trying to create a delete multiple selected items ListView.The code is running right but when I add an ImageButton to custom_list_row.layout it's not working. I don't know about the problem. Maybe there is the same…
taha amiri
  • 199
  • 13
4
votes
1 answer

How to access/get the resource id of the image in an ImageButton (Android)

I have an ImageButton, and I want to use the Image associated with in the OnClick event. I found this: Android ImageButton - determine what resource is currently set But I wonder is there any built in way to find the resourceid of the image in an…
borod
  • 43
  • 1
  • 4
4
votes
4 answers

android ImageButton gets gray background

i have a Button with a nice background selector. fine. in stead of text in the button, i want an image. i have tried just changing it to an ImageButton with a src attribute. when i do this, it looks like a gray background is overlaid behind my…
Jeffrey Blattman
  • 22,176
  • 9
  • 79
  • 134
4
votes
1 answer

Unable to resolve drawable in attribute "src"

I'm having a problem when trying to load various images to an image button using an xml file in the drawable-mdpi folder. It worked for one button but doesn't work for the other. The code works for the second image button but not the first, I get…
Connor
  • 211
  • 2
  • 8
  • 17
4
votes
6 answers

How to open the redirected page from Iframe to open in the parent window in ASP.NET?

I have an asp.net page that contains an Iframe embedded with some data and a ImageButton. On ImageButton click event (server side) I have Response.Redirct: Response.Redirect("results.aspx"); This always open the results.aspx in iframe. I want that…
Sri Reddy
  • 6,832
  • 20
  • 70
  • 112
4
votes
4 answers

Can I hide an image button on a layout, (dimensions and background) until a call to set visible?

I have a hidden image button in one of my xmls layouts, with a background set to a drawable image. I set the visibility to invisible, as I only want the image to display every once in a while. The problem is, even if the drawable isn't shown, the…
Sapp
  • 1,793
  • 7
  • 29
  • 51