in GUI Development by
How to change the size of the Pinyin input.

Need to change the position(starting position ,y1)of pinyin layout


Characterpreview class - updateLayout()

super( aSize );

// Stretch text view to the complete width
Text.Bounds.w = aSize.x;
Text.Bounds.h = aSize.y / 2;
Background.Bounds.h = aSize.y / 2;

1 Answer

0 votes

Hi mvg,

to change the start position of the pinyin input you can modify the bounds of the Text view within PinyinInput::CharacterPreviewClass.UpdateLayout(). Like

Text.Bounds.x1 = 10; // Set x1 of text view to 10px

In addition you need to ensure that the Background gets adjusted inside OnSetinputText

Background.Bounds.w = Text.Bounds.x1 + Font.GetTextAdvance( convertedInput, 0, -1 );

Hope this helps.

Best regards,




ok in this case you can modify the rowHeight variable inside PinyinInput::CharacterPreviewPinyinAndKeyboardClass and PinyinInput::PreviewButtonPinyinAndKeyboard. To change the x-offset of the first button to 32px modify inside the composer the x1 of Outline and TouchHandler inside PinyinInput::PreviewButtonPinyinAndKeyboard. To arrange the y.position of the complete preview modify the InputPreviewOffset property inside ExtendedVirtualKeyboard::Keyboard. To increase the height of the pinyin text and its blue background you can directly increase its height inside the composer of PinyinInput::CharacterPreviewPinyinAndKeyboardClass. To vertical center the text set its alignment to Views::TextAlignment[AlignHorzLeft, AlignVertCenter]. To limit the heigth of the blue selection rectangle you could do the following inside PinyinInput::PreviewButtonPinyinAndKeyboard.UpdateViewState():

if ( view != null )
  Selection.Bounds = view.Bounds;
  Selection.Bounds.h = 62;
  Selection.Bounds.origin.y = view.Bounds.origin.y + 8;

Best regards,


Ask Embedded Wizard

Welcome to the question and answer site for Embedded Wizard users and UI developers.

Ask your question and receive answers from the Embedded Wizard support team or from other members of the community!

Embedded Wizard Website | Privacy Policy | Imprint