ITEXTCTL cannot delete character | developer.brewmp.com ITEXTCTL cannot delete character | developer.brewmp.com

Developer

ITEXTCTL cannot delete character

Forums:

I created text field using ITEXTCTL but it unable to backspace to delete character that i input. How to set it so that it can delete character? Any API can solve it?

Rachel wrote:I created text field using ITEXTCTL but it unable to backspace to delete character that i input. How to set it so that it can delete character? Any API can solve it?
Rachel, I see - you make the same mistakes when programming for BREW, which I have in the past.
In this case, possibly ITEXTCTL_HandleEvent method can help you:
static boolean YourApp_HandleEvent(YourApp* pMe, AEEEvent eCode, uint16 wP, uint32 dwP)
{
switch (eCode)
{
//... some code skipped...
case EVT_KEY:
if (ITEXTCTL_IsActive(pMe->YourTextControl))
ITEXTCTL_HandleEvent(pMe->YourTextControl,eCode,wP,dwP);
//... some code skipped...
}

Rachel wrote:I created text field using ITEXTCTL but it unable to backspace to delete character that i input. How to set it so that it can delete character? Any API can solve it?
Rachel, I see - you make the same mistakes when programming for BREW, which I have in the past.
In this case, possibly ITEXTCTL_HandleEvent method can help you:
static boolean YourApp_HandleEvent(YourApp* pMe, AEEEvent eCode, uint16 wP, uint32 dwP)
{
switch (eCode)
{
//... some code skipped...
case EVT_KEY:
if (ITEXTCTL_IsActive(pMe->YourTextControl))
ITEXTCTL_HandleEvent(pMe->YourTextControl,eCode,wP,dwP);
//... some code skipped...
}

Rachel wrote:I created text field using ITEXTCTL but it unable to backspace to delete character that i input. How to set it so that it can delete character? Any API can solve it?
Use the AVL_CLR key to handle the back button or the SOFT2 key for clearing the data inside the Text control.
Write the Handle event for the Text Control in the AVK_CLR case.

Rachel wrote:I created text field using ITEXTCTL but it unable to backspace to delete character that i input. How to set it so that it can delete character? Any API can solve it?
Use the AVL_CLR key to handle the back button or the SOFT2 key for clearing the data inside the Text control.
Write the Handle event for the Text Control in the AVK_CLR case.