Languages

Menu
Sites
Language
EditArea and floating point
Аmmm:D Just two questions.
1) Is it possible to add a point of numbers mode. And that is problematic.
2) I use EditArea mode is not full screen. I would like to hide after input keypad.
I found a way.

  1. void
    MyForm::OnKeypadActionPerformed(Tizen::Ui::Control& source, Tizen::Ui::KeypadAction keypadAction)
    {
       if (keypadAction == KEYPAD_ACTION_ENTER)
       {
          editarea->HideKeypad();
       }
    }
    But when I press the ENTER text of EditArea erased completely. I do not know what to do, please tell me.
    I want to when you press the ENTER button to close the keypad. Thanx :D
Edited by: Brock Boland on 17 Mar, 2014 Reason: Paragraph tags added automatically from tizen_format_fix module.

Responses

4 Replies
Alex Ashirov

Hi,

  1. Could you please explain in more details what do you need?
  2. AFAIK, the keypad’s “Enter” button is usually used in order to add new line inside the TextArea control. But you may use

Tizen::Ui::Controls::EditArea::SetOverlayKeypadCommandButtonVisible()

function to make visible “Done” and “Cancel” buttons for overlay keypad (your case). Then you will be able to handle these buttons in your

OnActionPerformed() handler and hide keypad when the “Done“ button is pressed.

Levan Gogohia

A function HideKeypad () what is needed?

thanx))

Levan Gogohia

I just want to hide after the input keyboard))

Gary V

Hi,

EditArea is multi-line, as opposed to EditField, which is single-line. If you hit ENTER, EditArea will "scroll" to a new line and if the control has the height of only one line, EditArea might appear as "cleared".

Try:

pEditArea->SetKeypadAction(KEYPAD_ACTION_DONE);
pEditArea->AddKeypadEventListener(*this);

...

void Form::OnKeypadActionPerformed(Tizen::Ui::Control& source, Tizen::Ui::KeypadAction keypadAction)
{
    // hide keypad when the action button is clicked
	
	if (keypadAction == KEYPAD_ACTION_DONE)
	{
		if (dynamic_cast<EditArea*>(&source))
			dynamic_cast<EditArea*>(&source)->HideKeypad();
	}
}

If I am not mistaken, EditArea does not include any styles (text-only). EditField, on the other hand, can ::Construct() with EDIT_FIELD_STYLE_NORMAL, EDIT_FIELD_STYLE_PASSWORD, EDIT_FIELD_STYLE_NUMBER, etc. However, there seems to be no style for digits and a decimal point. It's either digits only (EDIT_FIELD_STYLE_NUMBER), or digits and letters (EDIT_FIELD_STYLE_NORMAL).

Gary