How to make image visible in Blackberry when button is pressed? - image

I want to show image when button is pressed on main screen in blackberry, How can I do this?
Simply I have a button, when I do press it, the data is loading from xml, and I want to show that data is loading, how can I do this, I have image(having text on it).
Help!

You can add that image in a vertical field manageer and add the vertical field manager to the screen on the button click. that's it..

Related

Image with modal then zoom

So I am doing a modal for a website in which the image will be small. When you click on the button "Open Modal", the image opens. You are able to hover over the image and see pieces of it that are larger. You can the click on the x at the top right or click off of the modal and the modal closes. I have tried using a regular modal with:
----tried adding my code here, but this site won't let me---
Can someone please help?
The image is either too big to see the x at the top right to close the modal or the image doesn't hover correctly or the image just doesn't work.
I have tried using w3 schools to do this:
What I Want:
I want the image to be like the following picture (an image with a modal button below it) and then when you open the image in the modal by clicking on "View Full-Size Image", the image opens up larger. Then, you can hover over different parts of the image....(as you hover, you will see that zoomed part) in order to see that part larger. I am not sure what I am doing wrong. I need the modal, but I also need to be able to hover inside of the modal like a magnifying glass.
a modal with an image
inside of the modal

change ListView item image at runtime (firemonkey)

I need the ability for a user to press and set an ListView item's checkbox independently of clicking on the item. If they press on the checkbox I will add/remove the checkmark and take some action. If they press on the item text I can take another action.
I can do this with a ListBox no problem with built in functionality. I can't figure out how to do it with a ListView. How is it done?
I can put the following code in the ListView1ItemClickEx to know when the user is clicking on the image. Maybe I can just change the image to a checkmark?
if (ItemObject->Name == "I") {
ShowMessage("Item Image clicked");
}
But I don't know how to change that particular items image (e.g. I could just toggle between a checkmark image and an unchecked image) at runtime.
The picture below is for clarity. Clicking anywhere in the red box will change the items checkbox. For the ListBox clicking anywhere in the blue box will fire the OnClick event and not change the checkbox. I want that same behavior in the ListView.
Ok, Remy answered this related question and it helped me solve this issue. Now I can make the ListView have a checkbox that functions like that of the ListBox. I do it by toggling the item image whenever the user presses (or clicks on) the image area of an item.
When the user clicks an items image I trap it (per Remy's code in the ListView1ItemClickEx event) and toggle it from 0->1 or 1->0 in a vector at reference ItemIndex (e.g. myVector[ItemIndex] = 0) and then I completely rebuild the ListView (clear it and build from scratch).
I thought I'd have to remember where in the list I had scrolled down to and after refreshing the ListView I'd have to scroll to that point in code - but, that isn't the case. I don't know why but after the refresh I'm still at the point in the list where I clicked an item image. It makes it work and feel exactly like a check box.
It works great in iOS, Android, and Windows.
p.s. I forgot to mention that you need to treat any Header's like they are items in your vector that keeps up with each items' image (0 or 1). Otherwise adding headers gets you out of sync and clicking an item's image will toggle some other item's image.

How to add an image by pressing a button in JavaFX

I want to be able to press a button and an image appear on the page.
Additionally, I want to be able to place the button with Y and X coordinates, not through layouts.
Would I need to use an image view?
Your question isn't very precise, so I hope I answer what you need.
To show an Image generally you need an ImageView, that is correct. For less common image formats you might need an external library.
To only show the image when the button is clicked, you have to first set the ImageView to not managed and not visible. Then when the button is clicked make it visible and managed and it will show.
About the absolute positioning of your button, you can override the layout children of any Parent object and set exact positions. Take a look at this question.

Image changing while pressed

I have 2 images for a JComponent, one of an unpressed button, and one of a pressed button. When I click the button, I want the image to change for the pressed one, but only while I am clicking. Which means whenever I release the mouse button, the image goes back to the unepressed button.
How can I do this?
Using a JButton, set the standard and pressed icons.

HorizontalFieldManager animation in Blackberry

Can I animate the HorizontalFieldManager in Blackberry?
I have a button in the bottom bar of the screen, and there is an array of images which display in a horizontal layout above the button.
When I click on the button, there should be a slide-in slide-out effect and the images appear one after the other.
Can anyone suggest me any tutorial or link for this?
I think the working approach will be in implementing your own custom bitmap field and placing it above the button, you want to press. When button is pressed, then intercept this event and update contents of your custom bitmap field.
Here is an example, how to create a custom field with RIM SDK.

Resources