How do I create a number pad as a control? - windows-phone-8

Pretty new to windows phone development...
I'm trying to create an input view that contains a number pad for inputting a sales amount. I know that if you were inputting a number into a text box, you can set the input scope to numeric and then when you click in the text box, a number pad will come up but that's not what I'm trying to do.
I quite literally want the lower half of this screen to be just a number pad that is always up. There is no text box. Rather, as the user is punching in numbers, it'll be displayed in a textblock (a lot like you'd see in a calculator app). I'm not seeing a control for this and google just keeps bringing me back posts about InputScope. I was even thinking of maybe a hack-around where there's an invisible textbox that always has focus, causing the numberpad to always be up, but I don't even know how to cause that behavior either.
Is there a control or technique for this or am I going to have to roll a new user control? Can anyone point me in the right direction?

I would recommend creating your own custom control. That would be the best solution for your condition. There is no inbuilt solution for this situation. I was stuck in the same condition and created a new control with a custom keyboard and a textblock.
And for the hack you mentioned. You can register the LostFocus event of the textbox control and focus the control again using Focus() method of Textbox everytime is loses focus.

Related

How can I get the height of auto-grown text box before Print event in an MS Access 2016 Report?

I want to get the final height of a multi-line text box in an Access report so that I can align vertically smaller, one-line boxes, to that expanded one.
So that they end up looking like this:
It seems the only way to know the expanded size is in the Print event, and it's too late there because one can't move already drawn boxes. And yes, I've tried the Format event, but there the height is the one given before growing, at design time.
Does anyone know of an alternative? Maybe an add-on textbox control with this capability? Or an add-on function to get the Textbox.Height just before the Print event occurs?

Microsoft Access Form Auto Shifting Over when Typing in Text Box

In MS Access, if a user does not have the screen of the form maxed out like the first image.
Then when I go to type in the Comment section, the form shifts to the right and I can’t see the information to the left of it.
My question would be how do I stop the form from shifting over. I have users that use this form on multiple screen sizes.
Turn off form scroll bars in the form properties.
Make the form not so horrendously humongous. (You don't need text boxes that wide.)
Use a sub-form instead.
Make the form "prettier" and more user-friendly. It looks like you slapped it together with a wizard and didn't change anything afterwards. Find some tutorials about form building, creating a positive user-friendly experience, etc.

How to make navigation bar search box wait until pressing enter in MS Access?

I inherited an Access database and the main form uses the search box in the Navigation bar to find clients. The search function executes the search after every character that is entered, which is very slow over our network. There is a 2-4 second delay between each character.
Is there a way to make the search box wait until pressing "enter" before it executes the search?
I probably could add a custom search dropdown box , but I would like to avoid changing the users current practice (and save myself work) if at all possible.
Well, you're not providing us with much information.
I assume your current search is executed using VBA, probably by using the OnChange event on the search box. Move that to the AfterUpdate event, and you'll be done.
If you are using the inbuilt search facility located down by the record selectors, you are out of luck. Its behavior is hard coded into the Access exe program.
If you build your own search function then you can control exactly how it behaves. A great example is available here; http://allenbrowne.com/ser-62.html

Microsoft Access z-index property

I have a form including listboxes. I'm trying to change order of listboxes. I tried bring front or send back but they are not working in form view. I found z index property for arranging their priority. However, following codes are not working. Is this correct way to do it? Or is there any other way with or without codes to do this?
Me.Controls.SetChildIndex (Me.List0 , Me.List1)
Thanks for any help.
Without using code:
You can change the z-order by right-clicking any control and selecting "Position" then selecting either "Bring to Front" or "Send to Back."
Unfortunately, Access does not support the ZOrder method for manipulation using code. Microsoft Forms does support the ZOrder method which can get confusing when it comes up on Access Help.
As I reread your question, I wonder if you're talking about tab order. If so, right-click and bring up "Properties," select the "Other" tab, then adjust the "Tab Index" property. Also, make sure that the "Tab Stop" property immediately beneath is set to "Yes." In code you would use FormName.ControlName.TabIndex=0 to set a control to the first tab position.
Hope this helps!
Reference: Personal experience (and hours of frustration)
docmd.RunCommand acCmdDesignView
forms("form1").Controls("text0").inselection=true
docmd.runcommand acCmdSendToBack '(or docmd.runcommand acCmdBringToFront)
docmd.RunCommand acCmdFormView
Also, ZOrder is still not supported by Access 2016. As such, I have not yet learned a way to write a single line of code that puts a control in between two others, I just send the middle to back and then the back to back, and expand this to however many controls have to overlap.
And last, even though you use the VBA for ZOrder, your English does ambiguously sound like forms("form1").Controls("text0").TabIndex=34, which as Olek suggested, is also quite simple.
I did this on one Access form: The control I wanted on top I just cut and pasted it back to the form, then moved it over the one I wanted to cover. In this case, it was a text box (bound), almost the same size as a combo box (unbound); only the dropdown of the combo extended a bit to the right of the text box, so when the form was loaded the text box looked like a combo box. The user clicked the dropdown and made a choice and the record(s) pulled up were reflected in the text box.

Auto tab to the next fields depending upon the field type

I find it intriguing and couldn't find any special reason as to why the cursor should not advance to the next form field when the field type is "drop-down selection" or "radio button". As in both cases logically there cannot be any additional input.
Is there any attribute which can be applied so that the cursor moves on to the next field.
Consider how many forms are filled daily worldwide and how much time being wasted if there is no special reason.
STOP! What you are trying to do will break keyboard users. In fact, any change you make will break somebody's workflow.
Auto-tab should not be used for any field, ever.
Who knows your field is going to auto tab? Nobody. Why? Because that's not what fields do on the web. So, I press tab out of habit to get to the next field, what did I do? Oh no, I've tabbed past the next field, thanks to an unexpected auto-tab. Now I'll just have to tab back.
I'm editing a field, there are enough characters in the field already, I want to overwrite some characters in the field, oh no! I'm being auto-tabbed out of it before I can finish!
I'm a keyboard user, I use the up and down arrows to change the value in a select or radio. These are triggering onchange events every time I press them, even though I haven't finished changing the value to the value I want.
When I want to tab to the next field, I'll jolly well press it myself thanks.
There is a very special reason not to autotab, and this doesn't really waste any time (unless you're developing something for somebody to use constantly for several hours at a time). The special reason is you're following the principle of least astonishment.
Start with attribute tabindex="-1"
JQuery style:
$('.something').each(function(){
this.tabIndex = -1;
});
Ok, I was asking for logic and it looks like I have found a reasonable answer to myself.
The cursor stays there and doesn't auto-tab to the next field as next field type may be a radio field or again a drop-down selection field, where auto-tab cannot take any action for example selecting an option from multiple radio options.
But I still feel that there should be an option of auto-tab depending on where it can be used or where it can be omitted.
Auto tab is an important and needed feature. Why, for example, should I have to press the tab key after entering in my area code before I can type in the next 3 numbers? From a user experience perspective, that's really annoying. I would think there would be an attribute built into HTML5 or CSS3 to accomplish this. I found this thread as I'm looking for it. If anyone has an update, please share.