542 views
in GUI Development by
Hi!

I'm using a text editor in my project. When there is no text in the text editor the cursor become like a point and blinking in the corner of the text box even though it works fine in simulation. How should I make the cursor to its normal size, when there is no text?

Thank you.

Best Regards,

Thanushiyah

1 Answer

0 votes
by
Hello Thanushiyah,

if there is no text in the editor, the cursor retains its size and is aligned at left edge of the component. I suppose there is some error in your implementation or adaptation of the component.

Best regards

Paul Banach
by
Thank you, Paul Banach.

I write the following in 'on press' slot of the text editor to clear the text when user touches it.

TextEditor.Text.String="";
TextEditor.caretIndex=0;

When I write this as last two statements in 'on press' slot, then the cursor become a dot and blink at the corner of the text editor.

If I add a space like the following, then cursor will blink as the normal size. But I don't want to add a space as I'm counting number of characters in text editor.

TextEditor.Text.String=" ";
TextEditor.caretIndex=0;

Could you please suggest me a way to get this task to be done?

Regards,

Thanushiyah
by

Hello Thanushiyah,

the approach is not correct. The content of the Text Editor is determined by its own property String (not the property of the Text view embedded inside the editor component). To clear the editor just assign an empty string to the property String. For example:

TextEditor.String = "";

Best regards

Paul Banach

by
I tried this approach too.

TextEditor.String = "";

Still the result is same. when I write this in 'onpress' slot, cursor blinks at left corner like a point. Please assist me to solve this issue.

Regards,

Thanushiyah
by

Hello Thanushiyah,

using version 13 I was not able to reproduce this behavior. Possibly you have made some modifications in your copy of the Text Editor component causing this problem. To verify it, please add a new (not modified) copy of the Text Editor component to your project and try this version.

Best reagards

Paul Banach

Ask Embedded Wizard - Archive

Welcome to the Ask Embedded Wizard archive. This community forum served us well for many years, but we've evolved our support approach!

Your resources:

The Embedded Wizard Online Documentation provides comprehensive documentation, tutorials, examples and ready-to-use software packages.

For dedicated assistance, explore our Embedded Wizard Product Support.

You can still browse the valuable discussions from our community history here.

Embedded Wizard Website | Privacy Policy | Imprint

...