How to use suggestion or pop up to suggest while entering text input in kivy? - popup

Is it possible to use small pop up message or any suggestion to user that while entering please enter numbers between 40-70. I have designed a sample code in which I want user to enter only values between some range. So can someone please help me out so that I can know whether we can do it or not. Thank You.

You can use MDTextField widget from the material design inspired kivy library kivy-md. This widget has the attribute helper_text, which you can set to “Please enter numbers between 0 and 70”. You can additionally set an input_filter: “int” to only allow integer values for this widget. Remember that you still haveto validate the values to be in the desired interval. Below is an example of it.
MDTextField:
hint_text: "Helper text on focus"
helper_text: "This will disappear when you click off"
helper_text_mode: "on_focus"
input_filter: “int”

Related

I need to switch to numbers-only keypad input on mobile after 6 letters

I need to create a field where customers, on mobile, enter their "codice fiscale" (tax code). The code has this structure: (L=letter N=number)
LLLLLLNNLNNLNNNL
So basically what i'm trying to achieve is to automatically switch the user's keypad to numbers only when the next character has to be a number (on positions 7,8,10,11,13,14 and 15). I've seen it in some apps, but i can't figure out any way to do it.
Thanks for your help!
Screenshot to explain better what i mean

How to clear a SAPUI5 input field with only value help input allowed?

my SAPUI5 app has an input field where the valid values must be obtained through a value help:
<Input showValueHelp="true" valueHelpOnly="true"
valueHelpRequest="onValueHelpRequest"
value="{myModel>/myField}"
The value help is realized with a SelectDialog, where the only options are
choose one or
cancel
The problem is now the following flow:
User opens value help dialog to choose one item and presses Confirm
Input field now displays chosen value
User wants to clear the input, because it's optional
Unfortunately,
sap.m.Input doesn't provide a clear button
sap.m.SelectDialog doesn't provide the possibility to add a custom button like Clear
The input is layed out in a SimpleForm with 2 columns, labels and input fields, so it would be hard to add a clear button
The Gateway entity set which feeds the value help dialog list doesn't have a totally empty line
I don't like the workaround to switch the SelectDialog to multiSelect just for the purpose that the user can choose "one or none". I also think it would be hard to explain to the user "if you want to remove the value, hold the control key and click on the previously selected item again".
Any ideas out there how to easily implement a clear button or something similar?
valueHelpOnly="false"
// with this user can either fill by F4 (assisted input) or by typing input..
and if you want to clear you can add a button and set the value to null
oInput.setValue("");

GXT 3 spinnerField validation

I want to validate that user cannot change spinner value manually by typing in text box of spinner.
For example a field sales multiple = x which I fetched from server not fix.
and displays a spinner field with limitation of like bellow
spinner.setMinValue = x
spinner.setIncrement = x
spinner.setValue = x
so user forcefully select a value which is multiple with x. e.g. if x=3 the user have to enter 3,6,9... and so on.
So here my issue is if I type a 2 in spinner field text box. GXT widget accept that value.
Posible solutions:
Is there any predefined properties of spinnerfield that i forget to set it?
Is there any predefined validator for this?
Can I set text box of spinner field read only by css so user cannot focus on text box but still change a value.
If none of above how to achieve manually?
i've searched a bit in the different classes and I don't see either a precise method which would set what you want.
Don't know about one, and even with one, a validator doesn't change the value in the input field, but maybe it's enough for your needs.
You can disable the text input by calling setEditable(boolean) on the spinnerfield (testSpinner.setEditable(false);)
Maybe you could search around the IntegerPropertyEditor, I haven't tried but as long as a new Spinner is like this:
SpinnerField<Integer> testSpinner = new SpinnerField<Integer>(new NumberPropertyEditor.IntegerPropertyEditor());
you can seen that there is another Constructor for IntegerPropertyEditor, which takes a "NumberFormat" param, but there is no NumberFormart() constructor, so I'm not sure about how you create your own one, but that could be an idea (to format numbers in the input to be a multiple of the increment).
The last option would be that Sencha forgot this possibility and that you should report this as a "bug" on the forum ?
Hope to have helped a bit, good luck :).

PPTX - Finding out whether text is bulleted from OpenXML

I have not been able to find any indicator which could tell me whether text in txBody tag is bulleted or not, can you please me in identifying which indicator should I use to understand whether the text is bulleted or plain ?
-Thank you
Inside the txBody tag, you can look for the tags "a:buFont" and "buChar" which helps you identify that the text is bulleted. eg.
<a:buFont typeface="Arial" pitchFamily="34" charset="0"/>
<a:buChar char="•"/>
Update:
Hi, +1 For posting this question, learnt a lot from it.
After googling I found this link which addresses similar issue, the resoponse from Adamm clears this,
"Ok, so i think ive got this figured out. Basically if no formatting
is specified in the layout or the slide, it goes to the master, and if
its a 'title' or 'ctrTitle' shape it uses the formatting in
and it defaults to lvl1. Same goes for text that is not
in a title shape, for these it defaults to the formatting in
and if no lvl is specified it defaults to lvl1. And
another piece of advice, although not pertinent to my original
question, there is another txStyle in the slideMaster,
which is used for text in a shape that is not in a txBody."
Now the slide in your pptx is using "Office Theme" and the text you are interested in is in the format shape within the slide design. The bulletted text is inheriting from the slideMaster1.xml in SlideMasters.
As mentioned in the above quote the buletted text is getting inherited from "a:lvl1pPr" of "p:bodyStyle" in the slideMaster1.xml, also you can see the level 2 bullet is defaulted to "-" for the office Theme slide master there.
I tried to confirm this by changing the char = "•" to ">" to see the bulleting changed to ">" in the below line
<p:bodyStyle>
<a:lvl1pPr marL="342900" indent="-342900" algn="l" defTabSz="914400" rtl="0" eaLnBrk="1" latinLnBrk="0" hangingPunct="1">
<a:spcBef>
<a:spcPct val="20000"/>
</a:spcBef>
<a:buFont typeface="Arial" pitchFamily="34" charset="0"/>
<a:buChar char="•"/>
....
Now if you want to change it programatically you can do this from slide master 1. But the only problem here is When we change the bulletted style here(like above), it is changing for all the slides and also for the future slides you will be creating with the same theme within your ppt.
Hope this helps.
Regards.

DataGridViewComboBoxCell selectioindexchange event

I have a data-grid and three column in it. one column is type of DataGridViewComboBoxCell, three items are in this grid combo box, now i have to invoke selection index changed event to change value according to combo value change in grid.
also help me to make a new event ....
please help...
thanks
I really can't understand your question.
But maybe these informations can help:
A ComboBoxColumn has always two kinds of controls. A presenting one (in most cases a label) which is individually for each row. And a editing one that will be shared for the whole column. So take a look into this documentation and the IDataGridViewEditingControl Interface.
Maybe these will give you a starting point on how to solve your problem.
In the Load event for the form, you need to get the cell that you want to add the handler to and cast it as a regular combo box. You can then add the event handler on SelectedIndexChanged, but it must be done programmatically, and depending on the language you are using.