Forums | developer.brewmp.com Forums | developer.brewmp.com

Developer

Forums

Forums:

Hi,
I have got a problem in ITextCtl_SetRect. The following is my code snippet.

ISHELL_CreateInstance(pMe->a.m_pIShell,AEECLSID_STATIC,(void**)&pIStatic);
SETAEERECT(&rc,5,15,115,15);
ISTATIC_SetRect(pIStatic,&rc);
ISHELL_LoadResString(pMe->a.m_pIShell,RES_FILE,IDS_CREATE_TEAM,pMe->m_aszBuffer,sizeof(pMe->m_aszBuffer));
ISTATIC_SetText(pIStatic,pMe->m_aszBuffer,NULL,AEE_FONT_BOLD,NULL);
ISTATIC_SetProperties(pIStatic,ST_CENTERTITLE);
ISTATIC_Redraw(pIStatic);

ISHELL_CreateInstance(pMe->a.m_pIShell,AEECLSID_TEXTCTL,(void**)&pTextCtl);
SETAEERECT(&rc,5,35,115,15);
ITEXTCTL_SetRect(pTextCtl,&rc);
ITEXTCTL_SetTitle(pTextCtl,RES_FILE,IDS_PHONE,NULL);
ITEXTCTL_Redraw(pTextCtl);

The text control is drawn in the specified rectangle.But the screen background(entire screen except some bottom portion) becomes white.I have set a color in the background.I dont want white at the top.If the static control alone is drawn,the display is fine.But when textctl is added white color is drawn which hides the static control also.

Can anyone help....

Yes. I have also faced the same problem. What i did before activating textbox, i draw the frame with rectangle as whole screen using IDISPLAY_DrawFrame() with background colour.
Hope it will help u also

Yes. I have also faced the same problem. What i did before activating textbox, i draw the frame with rectangle as whole screen using IDISPLAY_DrawFrame() with background colour.
Hope it will help u also

Hi,
Iam having an image at the background.On the image iam drawing a rectangle with some color.And in that rectangle,I have to place text control.
When I use IDISPLAY_DrawRect,some portion of the image is hidden by some white rectangle.
Can anyone help out....
Thanks

Hi,
Iam having an image at the background.On the image iam drawing a rectangle with some color.And in that rectangle,I have to place text control.
When I use IDISPLAY_DrawRect,some portion of the image is hidden by some white rectangle.
Can anyone help out....
Thanks

Hi Sri
Do u want to have only TextCtl rectangle to be displayed on the image?
If yes then do the following
1)Create ITextCtl interface object;
2)set rectangle properties using SETAERECT helper function
3)set ITextCtl properties
now you first draw desired image on the devise monitor
After drawing image call ITextCtl_SetActive passing TRUE as boolean value
I hope this will not affect the image
Cheers
SVAVS

Hi Sri
Do u want to have only TextCtl rectangle to be displayed on the image?
If yes then do the following
1)Create ITextCtl interface object;
2)set rectangle properties using SETAERECT helper function
3)set ITextCtl properties
now you first draw desired image on the devise monitor
After drawing image call ITextCtl_SetActive passing TRUE as boolean value
I hope this will not affect the image
Cheers
SVAVS

Hi Svavs,
Thx...
I want something like this
An image in the backgorund.A rectangle on the image(should be something like a pop up) , and textctl on the rectangle.
Whenever i make textctl active, a white rect is shown irrespective of the rectangle set.

Hi Svavs,
Thx...
I want something like this
An image in the backgorund.A rectangle on the image(should be something like a pop up) , and textctl on the rectangle.
Whenever i make textctl active, a white rect is shown irrespective of the rectangle set.

I don't know if this will help you at all; but you may want to check out the thread, which mentions an ITextCtl bug ... well I guess it doesn't really help, but it may explain what's going on.
Paul

I don't know if this will help you at all; but you may want to check out the thread, which mentions an ITextCtl bug ... well I guess it doesn't really help, but it may explain what's going on.
Paul

When you call ITEXTCTL_SetRect(), the text control will first erase the old rect before redrawing in the new rect. A newly created text control defaults to the size of the screen, I believe. So that's probably why your screen is being cleared.
To get around this, create your text control and set its rect before you do any other drawing.
-Erik

When you call ITEXTCTL_SetRect(), the text control will first erase the old rect before redrawing in the new rect. A newly created text control defaults to the size of the screen, I believe. So that's probably why your screen is being cleared.
To get around this, create your text control and set its rect before you do any other drawing.
-Erik

hi,
But if my background should be an image.If am drawing image after setting the text control,only image is seen and not the control.
Any method to draw text control on the image without clearing the screen.
thanx

hi,
But if my background should be an image.If am drawing image after setting the text control,only image is seen and not the control.
Any method to draw text control on the image without clearing the screen.
thanx

Perhaps, you're confusing displaying the text control and setting its rectangle. As far as I know, you should be able to set the text control's rectangle, draw your background image, and then draw the text control (but the bug that I mentioned in a previous post will still be in effect, and mess things up a bit).
Paul

Perhaps, you're confusing displaying the text control and setting its rectangle. As far as I know, you should be able to set the text control's rectangle, draw your background image, and then draw the text control (but the bug that I mentioned in a previous post will still be in effect, and mess things up a bit).
Paul

Set the text control's rect to {0,0,0,0}, then draw the image, and then set the rect to the size it needs to be.
-Erik

Set the text control's rect to {0,0,0,0}, then draw the image, and then set the rect to the size it needs to be.
-Erik

Hi,
thx all.It is working fine if i set the rectangle for text control before drawing image and then make it active.
Is there any way to set the background color for text control.
thanx.

Hi,
thx all.It is working fine if i set the rectangle for text control before drawing image and then make it active.
Is there any way to set the background color for text control.
thanx.

sri wrote:Is there any way to set the background color for text control.I believe there is ... you'll want to take a look at IDISPLAY_SetColor and the enumerator CLR_USER_BACKGROUND (which is from the AEEClrItem enumerated type)
Paul

sri wrote:Is there any way to set the background color for text control.I believe there is ... you'll want to take a look at IDISPLAY_SetColor and the enumerator CLR_USER_BACKGROUND (which is from the AEEClrItem enumerated type)
Paul

Hi Sri,
I am new to Brew. I am using Brew 1.1.
I am facing the same problem that u faced long before.
I have image as backgroud and i am loading a text control over the image.
Now the text control shows a white bg for the control.
I don't want the bg image to be erased when the text control is loaded.
I am loading the image frist then drawing the text box.
help me.
Thanks in advance
Regards
Balakumar C.G.

Hi Sri,
I am new to Brew. I am using Brew 1.1.
I am facing the same problem that u faced long before.
I have image as backgroud and i am loading a text control over the image.
Now the text control shows a white bg for the control.
I don't want the bg image to be erased when the text control is loaded.
I am loading the image frist then drawing the text box.
help me.
Thanks in advance
Regards
Balakumar C.G.

Hi!
I have faced the same problem in brew 2.1.0 version. What I did is to draw the bitmap again after loading the text control. Let me know if you find another solution.
BR,
Arindam

Hi!
I have faced the same problem in brew 2.1.0 version. What I did is to draw the bitmap again after loading the text control. Let me know if you find another solution.
BR,
Arindam

Hi!
I forgot to mention that the image didn't cover the portion of the screen where text control was drawn.

Hi!
I forgot to mention that the image didn't cover the portion of the screen where text control was drawn.