In my application the users needs to be able to enter a duration, consisting of minutes and seconds.
I am thinking of something like the control used in Windows to change the time, though I only need minutes and seconds and also the arrows would be nice, but are not necessary.
Is there already a control for this in JavaFX 2?
If not, how can I create such a control?
A screenshot of the mentioned Windows control:
Thanks for any hint!
Unfortunately there is no such control in standard JavaFX 2.
Although you can try to look at Spinner control from JFXtras project: http://jfxtras.org/
And intergrate it with TextEdit filtering approach described here: What is the recommended way to make a numeric TextField in JavaFX?
Nice implementation of spinner, though you need to adjust it to handle time inputs.
JavaFX NumberTextField and Spinner Control.
Related
I have my page1.cs that loads 400 labels in a stacklayout which takes several seconds and am in need of a way to indicate that it is busy loading. I will most likely have other pages in my app that need the same ability.Please suggest a code for it keeping in mind I am a newbie.
You could use ACR User Dialogs. This allows you to display a loading dialog from anywhere in the application. There are plenty of examples on the GitHub repository for it as well. This blocks user input if you want, and has other types of dialogs as well, although I have only used the Loading Dialogs. The basic usage is just like this
UserDialogs.Instance.ShowLoading("Loading...");
and
UserDialogs.Instance.HideLoading();
If you want to do it for a task there is slightly different usage, but is provided in his samples. I currently am using this on Android and iOS and can assure you that they have a clean look.
Forms has a built in ActivityIndicator you can use
I am using Xamarin forms DisplayAlert. I have two buttons in it one is light blue and another is Darker blue. I guess it is focus effect causing the difference.
can I set focus as per requirement? I tried to search documentation but no luck.
DisplayAlert("Caption", "Message", "Cancel", "Send");
Cancel and send are buttons on display alert. Default focus on Cancel.I want to switch focus to Send without changing position of buttons.
I am pretty sure that Xamarin doesn't (and will not) support providing focus to a specific button using a DisplayAlert since this feature exists in iOS only. Remember that Xamarin.Forms is meant to target all platforms, and not iOS only, and introducing a "focus" variable for a single platform would thus be a no-go.
What you can do, is to swap your two buttons around as you mentioned yourself.
If that is not an option, have a look at what you can achieve using third party libraries such as Acr.UserDialogs.
If that doesn't help you either, you will probably need to write a Custom Control or use an ActionSheet instead.
Good luck.
In my j2me blackberry application, I want to open editfield to enter text when user clicks on search icon. I have search icon added at the top right corner, when user clicks on it, I want to open basiceditfield with animating from right to left. I want Animation should be like default search on main screen in blackberry. How to do this? Is it possible?
You can do almost anything with the Blackberry Ui, if you understand it and are prepared to put the time in. But what you see when you press the magnifying glass is something that someone has spent a lot of time doing. There is API for doing anything like that (at least not one I have found). So if you are not experienced doing BlackBerry Ui, as I suspect is the case here, then I would suggest that replicating what the BB engineers have done with the animation from the search icon on the Home screen to the search screen, is too difficult to justify.
A lot of these sorts of things are, in my opinion, just gloss. They do not make the application any easier to use, just make it look flash. Personally, I would spend your time on making sure your application works well, rather than making it look flashy.
I do recommend using the screen transition animations as a way of moving from one screen to another. These are fairly easy to use and when used correctly, provide a good visual clue to your user regarding the flow through your application. I also suggest you spend some time making sure your assets (icons etc.) look good, on all the various sizes of BB that you are developing for.
Is there way to change the orientation of the emulator in runtime.
I have some tests for a component which include different layouts based on orientation. It would be great if this is possible.
I'm not sure what you are asking for?
If you just want to change the orientation yourself, then use the mouse - there's some buttons top right on the emulator to change orientation - http://msdn.microsoft.com/en-us/library/ff402568(v=VS.92).aspx
If you want to automate this, then since I'm not sure there's a keyboard shortcut or command line for this, then you could just about do it by modifying the code inside https://github.com/Expensify/WindowsPhoneTestFramework/
Alternatively... it might be quicker/easier to just hack your own code to set the supportedorientation of each page just for one-off testing.
Late response (translated by google), but can be useful for others.
Management guidance on this in the options bar to the right of the emulator:
Detail to know, so that the orientation is done properly and is taken into account, we must re-press the "pause" button if you did previously to use your keyboard. Otherwise, you will feel duty systematic tilt your head to the left or right. :)
Is there a way to globally hide the mouse cursor for all apps in Cocoa (or Carbon)? Or at least replace it with something else?
EDIT: Thanks for the input guys, but turns out Daniel Jalkut found the solution a while ago :) http://lists.apple.com/archives/carbon-dev/2006/Jan/msg00555.html
You are looking for CGDisplayHideCursor, which is part of the Quartz Display Services API.
Check out: http://developer.apple.com/legacy/mac/library/samplecode/CarbonCocoa_PictureCursor/listing2.html
It's an old sample, but probably still works.
I expect that you're going to be limited to your application window, however. If you want to hide it for everyone you will probably have to make your window cover the screen.
Fun fact: The old toolbox function was simply "HideCursor()".
just add this to your code:
CGDisplayHideCursor (kCGNullDirectDisplay);
No, I don't believe there's a way of doing what you want, short of showing a full screen window and then obscuring absolutely everything on the desktop. That would also prevent e.g. keystrokes being sent to the right application and the like.