How do I get actions from a telephone-type keyboard's accessory buttons? - uikeyboard

Scenario: I'm working with an existing project that uses a telephone-based keyboard which has one or more stored phone numbers in its accessory view.
I'm told that this particular accessory view is non-custom, build in, de facto.
I understand that I can trap for each character input via a delegate. Question: How do I capture the ACTIONS of the phone buttons so I can glean the numbers?

The source of the problem was the custom filtering of the host UITextField; not the keyboard itself. The event handler is actually the UITextField delegate.

Related

Detect press of "cancel" on a Codename One lightweight date picker

On a Codename One lightweight date pickers, the user has four buttons in the top, like in the following screenshot.
I suppose the tapping of the second, third and fourth buttons are detected by the .addActionListener() (please correct me if I'm wrong)... but I need to detected also the tapping of the "Cancel" button. How can I run some code when the user taps "Cancel"?
We don't provide a way to detect cancel since we can't consistently detect it on native. As a workaround you can listen to the click on the picker button and unless you get a selection it would mean that the action was canceled.
Alternatively we can add a feature like this for the lightweight picker only. If you need that you can file an RFE on that.
I overcame this by comparing the newly selected picker value to the previously stored value. If it’s the same, I consider it a cancel.

CodenameOne set indexing of fields for virtual keyboard

Using CodenameOne,
I have a Form that the user needs to fill in. All of the components, however, are actually Containers that represent custom functionality. As an example, I would have a TextField alongside a Button on a Container, and I would use that Container as a "Component". This allows me to create more advanced functionality by combining existing Components.
A good example of where this is necessary is that of a custom date entry field existing out of 3 TextFields or a combination of TextFields and ComboBoxes.
I have a "Field" that has functionality for that of a Contact Component.
This all serves as a single "Unit" in order to allow the user to choose a contact or fill in their own. Buttons open Dialog popups, etc.
My problems comes with when the user uses the Android keyboard. Should this Contact Object be the second "Field" and the user presses the 'Next' button on the Android keyboard, the App does not know what field to give focus.
Furthermore, If one of the fields are a ComboBox or a Button and the user presses next to reach that Component, the keyboard doesn't close, and instead removes the 'Next' button, replacing it with a return button or an emoticon selector.
Below is an example situation:
The user would press on the first field, the Keyboard shows up, and when the user presses next, the keyboard's Next button dissapears, as the immediate next field happens to be a Button or ComboBox.
Is there a way to change the focusing index, or omit certain fields form ever gaining focus in this way? I tried making the entire thing a Component but that doesnt allow me to combine other Components. Even if it is possible to make the parent Container a Component, how would I solve this particular issue?
The default behavior is to use the "next focus down" for this functionality so just use setNextFocusDown(nextTextField) on each one of the components. Notice that a ComboBox won't work as expected although you might want to change that to an AutoCompleteTextField which would.

Customizing Navigation Buttons' Bar in MS Access Form

I am creating a form in MS Access. My form appears to the user in form of a modal pop-up box. At the bottom of the form we get Navigation Buttons, New Entry (which I have disabled), Filter and Search Options.
I want to customize this Navigation Button Bar. For example, I do not want 'Record' word to appear at the left most position in this bar.
I have been searching ways to do the same. I am not sure if the same can be achieved, but still hopeful.
Thanks in anticipation.
Jay
You can disable Navigation Buttons in form properties, which means the bar does not appear and in Access 2007 and 2010, you can set the Navigation Caption, which means you can have something instead of "Record", but you cannot customize the bar itself.
If you must have custom navigation, disable the bar and add your own navigation options.
You can change the Record into something else, but not customize the other bits of the navigation bar as far as I know.
Will show as:
If you want to go further than that, you may be able to intercept windows messages and change the wording on the fly, but that would complex and certainly a lot of work for not much.
On the other hand you could simply not show the navigation bar and create your own navigation using buttons and a bit of VBA instead.

Optimal setup for warning user before exiting screen when changes have been made

I have a user control ProfileEditor in a WPF application. It has a number of input controls (TextBoxes, ComboBoxes, Radio Buttons, DatePicker). It will be used to add details for a new profile, or change details for an existing profile.
There is a requirement that if any changes have been made from the initial state (blank for a new profile, prefilled with current data for existing profile), if the user tries to leave the screen, they will first be warned that there are unsaved changes. This control will always be on a Page inside a Frame element, so leaving the screen will be either when navigating to a new Page in the Frame, or exiting the application.
What is the optimal setup for this?
I am thinking that there would be some event that would be attached to all data entry controls on the page (or maybe one event per control type) on the TextChanged or SelectionChanged events that would then set a page-level bool property as to whether or not changes have been made. Is there a way to set these using styles for all types of a control on the page at one time?
And then how would I catch the close screen event? Attach something to the Frame.Navigating event?

How can I make some functionality of my WinForm application accessible even if running a Modal Dialog?

I've got a "Main Window" containing quite a few things, including, in the status bar (at the very bottom of the window), a "Support" button, which the user can use at any time to open a window containing our support phone number, along with a little chat functionality if the user prefers to chat with us.
The problem is that if the program is displaying a modal dialog, the "support" button is not clickable anymore.
Stopping using modal dialogs is not an option ; I use them because I sometimes want to force the user into performing a specific task before I can do something else in the software.
What's the best way to let the user contact the support without having to close the current modal dialog?
Modal dialogs should behave as modal dialogs, the user won't expect to be able to click a button in the main window even if it were possible.
Your best bet is to put a support button on the dialog too.
Using a shortcut key instead of a button may be an option. The functionality could be factorized into a base form class like this :
public class BaseForm : Form
{
protected override bool ProcessDialogKey(Keys keyData)
{
if (keyData == Keys.F1)
{
SupportForm f = new SupportForm ();
f.Show();
}
return base.ProcessDialogKey(keyData);
}
}
Not using modal dialogs is an option. You can disable other parts of your interface during the required interaction to get whatever it is that you need out of the user.
The solution is to avoid situations where the user 'must' do something. Modal dialogs often get in the way if, for example, the user wants to quit the application right at that moment, or see something in a backgrounded window, or refer to another part of your application. Instead of using them, design your interaction so that if there is a required action/piece of information, it's folded into the application logic.
Think about website design -- modal dialogs are very rarely found on the web, and for good reason -- they disrupt the user's workflow unnecessarily. And yet plenty of sites have 'required' information.
Don't use modal dialogs; they are a shortcut to avoid a better design.

Resources