New number editor

Overview

Figure 1. The new large number editor.

First, we will show you how to change the large number editor (Figure 1).

Afterward, in the second section, we will show you how to make the large number editor from the default number editor (Figure 2).

 

Figure 2: The default number editor.

Section 1: Change the large number editor

Step 1

To change the button structure of the large number editor, first, make a clone of “Large Numeric Keyboard” GUID "PD 19402”.

Step 2

Figure 3: An example of a different large number editor button setting.

Change the “Keyboard_layout” default label text, depending on the button’s new function.

If it’s only the numbers that change place, you don’t need to make any other changes. But if you change the place of a function key like +/-, then you also need to change its index in the “Paint_keys” and “Do_on_hit” methods.

Figure 3 shows a new “Keyboard_layout” that looks like Figure 4. We have swapped the +/- button with the number 4. In addition, we have moved the numbers around.

Figure 4: How a different large number editor layout can look.

Step 3

The “Paint_keys” method needs to have the button index for +/- changed. See Figure 5 and Figure 6.

 

Figure 5: The default large number editor Paint_keys +/- index and the new below.

Figure 6: New large number editor Paint_keys +/- index.

The “Paint_keys” method needs to have the button index for the number key changed. See Figure 7 and Figure 8.

 

Figure 7: Default large number editor Paint_keys number index.

Figure 8: New large number editor Paint_keys number index.

Step 4

And the “Do_on_hit”, first line 39 on Figure 9 and Figure 10:

Figure 9: Default large number editor Do_on_hit +/- index.

Figure 10: New large number editor Do_on_hit number index.

Then line 8 on Figure 11 and Figure 12.

Figure 11: Default large number editor Do_on_hit +/-  index.

Figure 12: New large number editor Do_on_hit number  index.

Section 2: Making a large number editor from the default number editor

Step 1

Clone the “Numeric_keyboard” GUID PD 2161.

Step 2

You need to change the layout of the buttons from a 4*4 square to a 3*5 rectangle.

First, open “Paint_keys” method override and change line 6-10 from this (Figure 13) to this (Figure 14):

Figure 13: Paint_keys line 6-10 default.

Figure 14: Paint_keys line 6-10 new.

Then line 77 from this (Figure 15) to this (Figure 16:

Figure 15: Paint_keys line 77 default.

Figure 16: Paint_keys line 77 new.

Step 3

Change the “Keyboard layout” so that it only has 15 elements. Further, give each element a default label text depending on what function the button has. The table below shows which element count belongs to what button in the 3*5 rectangle. Figure 17 shows how the “Keyboard_layout” is set up in the example.

0

1

2

3

4

5

6

7

8

9

10

11

12

13

14

 

 

Figure 17: New "Keyboard_layout" for example.

Step 4

Because of the change in “Keyboard_layout”, the index values in “Paint_keys” need to match the new ones. Figure 18 to Figure 23 shows the new indices in “Paint_key’s“ for the example.

Enter:

Figure 18: Paint_keys new enter key index.

Decimal separator:

Figure 19: Paint_keys new decimal point key index.

+/-:

Figure 20: Paint_keys new +/- key index.

Delete:

Figure 21: Paint_keys new delete key index.

Exit: