Displaying Textbox | developer.brewmp.com Displaying Textbox | developer.brewmp.com

Developer

Displaying Textbox

Forums:

Hi All,
Can anybody say how to display textbox in brew applications without using Brew UI Widgets?
Thanks in advance..

have you tried ITEXTCTL?

have you tried ITEXTCTL?

zkac054 wrote:have you tried ITEXTCTL?
Thanks for your reply..
But i have tried iTextCtl..
my code is as follows...
can u just give me a sample code to display the text box?
AEERect qrc;
SETAEERECT(&qrc,0,130,140,15);
ISHELL_CreateInstance(pMe->a.m_pIShell,AEECLSID_TEXTCTL, (void**)&pMe->pIText);
//SETAEERECT(&qrc,0,130,140,15);
//ITEXTCTL_SetTitle(pMe->pIText,ARCHITECTURE_RES_FILE,IDS_TEXTTITLE,NULL);
ITEXTCTL_SetActive(pMe->pIText,TRUE);
ITEXTCTL_Redraw(pMe->pIText);
IDISPLAY_Update(pMe->a.m_pIDisplay);
pMe->state=OK

zkac054 wrote:have you tried ITEXTCTL?
Thanks for your reply..
But i have tried iTextCtl..
my code is as follows...
can u just give me a sample code to display the text box?
AEERect qrc;
SETAEERECT(&qrc,0,130,140,15);
ISHELL_CreateInstance(pMe->a.m_pIShell,AEECLSID_TEXTCTL, (void**)&pMe->pIText);
//SETAEERECT(&qrc,0,130,140,15);
//ITEXTCTL_SetTitle(pMe->pIText,ARCHITECTURE_RES_FILE,IDS_TEXTTITLE,NULL);
ITEXTCTL_SetActive(pMe->pIText,TRUE);
ITEXTCTL_Redraw(pMe->pIText);
IDISPLAY_Update(pMe->a.m_pIDisplay);
pMe->state=OK

use these also
ITEXTCTL_SetRect & ITEXTCTL_SetProperties

use these also
ITEXTCTL_SetRect & ITEXTCTL_SetProperties

vallie wrote:use these also
ITEXTCTL_SetRect & ITEXTCTL_SetProperties
Hi,
Thanks for your reply...
I changed my code as below...
AEERect qrc;
AECHAR szText[]={'1','2','3','4','\0'};
if(ISHELL_CreateInstance(pMe->a.m_pIShell,AEECLSID_TEXTCTL, (void**)&pMe->pIText)==SUCCESS)
{
int len=0;
qrc.x=0;
qrc.y=50;
qrc.dx=pMe->DeviceInfo.cxScreen;
qrc.dy=qrc.y+15;
IDISPLAY_ClearScreen(pMe->a.m_pIDisplay);
//SETAEERECT(&qrc,0,30,40,150);
ITEXTCTL_SetRect(pMe->pIText,&qrc);
//ITEXTCTL_SetInputMode(pMe->pIText,AEE_TM_NUMBERS);
//ITEXTCTL_GetInputMode(pMe->pIText,0);
//ITEXTCTL_SetProperties(pMe->pIText,TP_FIXSETRECT);
ITEXTCTL_SetText(pMe->pIText,szText,10);
ITEXTCTL_SetActive(pMe->pIText,TRUE);
ITEXTCTL_Redraw(pMe->pIText);
//IDISPLAY_FillRect(pMe->a.m_pIDisplay,&qrc,MAKE_RGB(0,160,200));
Text(pMe,IDS_TEXTTITLE,0,30);
IDISPLAY_Update(pMe->a.m_pIDisplay);
pMe->state=OK;
}
But i can get only the static textbox...
I need to give the input dynamically...
I have to give only the numbers as input...
If i remove the SetText function i'm not getting the textbox...
please tell me what changes should i make with my code.....
Thanks in advance...

vallie wrote:use these also
ITEXTCTL_SetRect & ITEXTCTL_SetProperties
Hi,
Thanks for your reply...
I changed my code as below...
AEERect qrc;
AECHAR szText[]={'1','2','3','4','\0'};
if(ISHELL_CreateInstance(pMe->a.m_pIShell,AEECLSID_TEXTCTL, (void**)&pMe->pIText)==SUCCESS)
{
int len=0;
qrc.x=0;
qrc.y=50;
qrc.dx=pMe->DeviceInfo.cxScreen;
qrc.dy=qrc.y+15;
IDISPLAY_ClearScreen(pMe->a.m_pIDisplay);
//SETAEERECT(&qrc,0,30,40,150);
ITEXTCTL_SetRect(pMe->pIText,&qrc);
//ITEXTCTL_SetInputMode(pMe->pIText,AEE_TM_NUMBERS);
//ITEXTCTL_GetInputMode(pMe->pIText,0);
//ITEXTCTL_SetProperties(pMe->pIText,TP_FIXSETRECT);
ITEXTCTL_SetText(pMe->pIText,szText,10);
ITEXTCTL_SetActive(pMe->pIText,TRUE);
ITEXTCTL_Redraw(pMe->pIText);
//IDISPLAY_FillRect(pMe->a.m_pIDisplay,&qrc,MAKE_RGB(0,160,200));
Text(pMe,IDS_TEXTTITLE,0,30);
IDISPLAY_Update(pMe->a.m_pIDisplay);
pMe->state=OK;
}
But i can get only the static textbox...
I need to give the input dynamically...
I have to give only the numbers as input...
If i remove the SetText function i'm not getting the textbox...
please tell me what changes should i make with my code.....
Thanks in advance...

You are getting the textbox but it's just invisible, well more accurately the color of the textbox is the same as the background so you can't see it. You should set a frame around it so you can see it, also it might be a good idea to set a title to it as well e.g.
ITEXTCTL_SetTitle(pme->pIText, RESOURCE_FILE, ID, 0); <-- Assuming you use resources
ITEXTCTL_SetProperties(pMe->pIText, TP_FRAME);

You are getting the textbox but it's just invisible, well more accurately the color of the textbox is the same as the background so you can't see it. You should set a frame around it so you can see it, also it might be a good idea to set a title to it as well e.g.
ITEXTCTL_SetTitle(pme->pIText, RESOURCE_FILE, ID, 0); <-- Assuming you use resources
ITEXTCTL_SetProperties(pMe->pIText, TP_FRAME);

try this
ITEXTCTL_SetProperties(pMe->pIText,TP_FRAME);
ITEXTCTL_SetInputMode(pMe->pIText, AEE_TM_NUMBERS);

try this
ITEXTCTL_SetProperties(pMe->pIText,TP_FRAME);
ITEXTCTL_SetInputMode(pMe->pIText, AEE_TM_NUMBERS);

zkac054 wrote:You are getting the textbox but it's just invisible, well more accurately the color of the textbox is the same as the background so you can't see it. You should set a frame around it so you can see it, also it might be a good idea to set a title to it as well e.g.
ITEXTCTL_SetTitle(pme->pIText, RESOURCE_FILE, ID, 0); <-- Assuming you use resources
ITEXTCTL_SetProperties(pMe->pIText, TP_FRAME);
Hi,
Thank you very much...
I tried that.. the text box appears.. but the problem now is when i write any text in it the control is giong to the main page of my application...
i'm not able to give the text in the text box...
i have give only the numbers in it..
is there any way?
please help me....

zkac054 wrote:You are getting the textbox but it's just invisible, well more accurately the color of the textbox is the same as the background so you can't see it. You should set a frame around it so you can see it, also it might be a good idea to set a title to it as well e.g.
ITEXTCTL_SetTitle(pme->pIText, RESOURCE_FILE, ID, 0); <-- Assuming you use resources
ITEXTCTL_SetProperties(pMe->pIText, TP_FRAME);
Hi,
Thank you very much...
I tried that.. the text box appears.. but the problem now is when i write any text in it the control is giong to the main page of my application...
i'm not able to give the text in the text box...
i have give only the numbers in it..
is there any way?
please help me....

yogeshwari_am wrote:Hi,
Thank you very much...
I tried that.. the text box appears.. but the problem now is when i write any text in it the control is giong to the main page of my application...
i'm not able to give the text in the text box...
i have give only the numbers in it..
is there any way?
please help me....
Hi,
I have to give only the numbers.. not the string...
please tell me how to give only the numbers..
how to prevent the control which is going to the main page when i write anything in the text box?

yogeshwari_am wrote:Hi,
Thank you very much...
I tried that.. the text box appears.. but the problem now is when i write any text in it the control is giong to the main page of my application...
i'm not able to give the text in the text box...
i have give only the numbers in it..
is there any way?
please help me....
Hi,
I have to give only the numbers.. not the string...
please tell me how to give only the numbers..
how to prevent the control which is going to the main page when i write anything in the text box?

In your handleEvent are you allowing the textctl to access the events? For example at the top of the function try something like:
if(ITEXTCTl_HandleEvent(.....))
return TRUE;
This passes the control to the text control, if it is able to handle the control. I'll let you figure out the parameters to pass in :D

In your handleEvent are you allowing the textctl to access the events? For example at the top of the function try something like:
if(ITEXTCTl_HandleEvent(.....))
return TRUE;
This passes the control to the text control, if it is able to handle the control. I'll let you figure out the parameters to pass in :D

Use ITEXTCTL_SetInputMode to set the text mode n use the handler to handle and view the text which is typing...

Use ITEXTCTL_SetInputMode to set the text mode n use the handler to handle and view the text which is typing...