JavaFX click through ImageView - javafx-2

I want to click through a component like ImageView.
ImageView iv = new ImageView(new Image(getClass().getResourceAsStream("/image.png")));
//What function to use to click through iv ?
I try this but still don't work
iv.setMouseTransparent(true);

If you don't want a node to receive mouse events, make it mouse transparent.
imageView.setMouseTransparent(true);

Related

How to make menu button in Android?

I want to make a button looking as in the picture:
Source: Settingsapp from Huawei
I don't want to use a graphic for the arrow if that is possible, but use a special component which uses this arrow by default.
You can use ListView to make a button with Images and Texts or can put your items in a LinearLayout

Slide UIWebView over a ImageView (like safari)

I think the title says everything about my problem.
The ImageView is not in the UIWebView.
I want that the ImageView is pushed up by the WebView.
It's actually pretty simple. If you go into your storyboard (or nib) and choose the the webView and choose a color for it's background property, anytime you scroll above the view that background color would appear. So all you need to do is load an image for that background color.
In your viewDidLoad method, place this bit of code:
self.webView.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:#"background.png"]];
and where it says background.png
just put the image name that you loaded into your project.
Hope this helps!

Change "back" NavigationItem text in Monotouch?

Is it possible to change the "Back" button text in a NavigationItem? At present, the caption of the back button assumes the title of the previous layer in the navigation stack, which is expected.
However, the NavigationItem's LeftBarButtonItem can be changed using code such as this:
UIBarButtonItem backButton = new UIBarButtonItem("Back", UIBarButtonItemStyle.Plain, null);
myNewView.NavigationItem.SetLeftBarButtonItem(backButton, true);
This works and the back button is displayed as expected, but the button is a square and does not navigate back to the previous layer as expected. I'm guessing that the correct event needs to be assigned to it, but I have no idea what it should be.
How would one go about ensuring that the new UIBarButtonItem has the correct event and arrow shape?
Note: I have also tried re-using the `LeftBarButtonItem' as suggested in this SO question, but I still don't know how to customize the button caption. I am probably just missing the obvious.
Thanks!
Set the title on the previous viewcontrollers navigationitem. I answered this before and will look up the link.
Ah, yes: Separate title in NavigationBar and navigation buttons

inputAccessoryView not hide the view when -resignFirstResponder?

I have attached a toolbar with a UITextField and UIButton to the keyboard when it becomes the first responder via the user taping inside the textfield
textField.inputAccessoryView = theToolbar;
Problem is, the toolbar disappears when the keyboard is dismissed, thus preventing any further input.
Any ideas on how to make the toolbar go back to the bottom of the screen rather than off it completely?
I'm thinking a delegate method might help but Im really not too sure. It seems once the inputAccessoryView always the inputAccessoryView :(
Cheers
The input accessory view is automatically dismissed with the input view (the keyboard, in this case). Generally you do not want to have an input accessory view in your view hierarchy. Instead, if you want your toolbar to scroll up when the keyboard is shown, you should follow the guidelines for Managing the Keyboard.
You could try using an additional toolbar that is offscreen as the inputAccessoryView, which could "fake" the appearance of what you are trying to do. Alternatively, have you tried adding the toolbar back to the bottom of the screen using
[self.view addSubview:theToolbar];
when the keyboard reaches the bottom of the screen? You can use keyboard notifications for this.

Textbox on canvas in j2me

I am going to make application on j2me using canvas. I want to take textbox or textfield on my canvas.
You can draw a basic textbox and display a string , and when it receives focus, you can switch the view to that particular textbox ,something like this
textBox = new TextBox(....);
Midlet.display.setCurrent(textBox);
This would create your data entry more robust and save you from the pain of implementing various keyboard issues yourselves
These items are only available for adding to Forms. Canvas is a class for handling lower-level events.
You have to implement your own textbox, and that isn't easy.Basic textbox would be a rectangle (drawRect) with text (drawString) inside of it.

Resources