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.
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.
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.
And the “Do_on_hit”, first line 39 on Figure 9 and Figure 10:
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.
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:
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.
Figure 17: New "Keyboard_layout" for example.
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.
Figure 18: Paint_keys new enter key index.
Figure 19: Paint_keys new decimal point key index.
Figure 20: Paint_keys new +/- key index.
Figure 21: Paint_keys new delete key index.