If the software keyboard must be present on more than one panel a separate panel can be defined to only contain the keyboard. This panel can then be included in all panels that shall present a software keyboard. This simplifies a lot if the keyboard layout must be changed since it is only necessary to change the keyboard in one place.
A typical example is to include a software keyboard display panel in the CodeInputPanel. A typical example of the software keyboard panel looks like this:
<TFT:Panel def:Name='SoftKeyboardPanel'>
<Controls>
<TFT:Button Name='ButtonA' KeyValue='A' Location='0, 50'
Size='45, 45' Click='OnKeyboardHit'/>
<TFT:Button Name='ButtonB' KeyValue='B' Location='50, 50'
Size='45, 45' Click='OnKeyboardHit'/>
<TFT:Button Name='ButtonC' KeyValue='C' Location='100, 50'
Size='45, 45' Click='OnKeyboardHit'/>
...
</Controls>
</TFT:Panel>
To make use of the SoftKeyboardPanel defined above, it is necessary to create a reference in the panel that shall display the software keyboard. The panel example below is a definition of CodeInputPanel that includes the SoftKeyboardPanel defined above by creating a new TFT:Panel definition inside the CodeInputPanel and referring to the SoftKeyboardPanel with the SubForm property:
<TFT:Panel Name='CodeInputPanel'>
<Controls>
<TFT:Panel Name='CodeInputKeyboard' SubForm='SoftKeyboardPanel'
Location='45,100' Size='550, 200'/>
</Controls>
</TFT:Panel>