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

Developer

Forums

Hi
Please tell how can I change the the height of soft Key.
I sucesfully change the color but unable to change the width and height.

IFORM_GetWidget(IRootForm_to_IForm(me->piRootForm), WID_SOFTKEYS , &softkeywidget);

IWIDGET_GetPropPtr(softkeywidget, PROP_SOFTKEY1, &pWidget);
Ext.width=30;
Ext.height=70;
nErr=IWidget_SetBGColor(pWidget,MAKE_RGB(255,0,0));
IWidget_SetPadding(pWidget,5);
IWidget_GetExtent(pWidget,&Ext);

Rita,
Are you calling IWidget_SetExtent
I couldn't see that in your code snippet.

Rita,
Are you calling IWidget_SetExtent
I couldn't see that in your code snippet.

Yes I am calling it.But it is not helping me.
I am interested in changing the location of soft key.

Yes I am calling it.But it is not helping me.
I am interested in changing the location of soft key.

hi,i am new to brewMP.i am trying to get scrollbar in my simulator of BREWMP but anyhow it is not showing .please can anyone correct me or show me the right and proper code to do this:-
the code which i had implemented for scrollbar is:-
result =ISHELL_CreateInstance(pMe->piShell, AEECLSID_ROOTCONTAINER, (void *)(&pMe->picRoot));
IROOTCONTAINER_QueryInterface(pMe->picRoot, AEEIID_WIDGET, (void *)(&pMe->piwRoot));
if(result != 0)
DBGPRINTF("RESULT1 FAILED");
result = ISHELL_CreateInstance(pMe->piShell, AEECLSID_DISPLAYCANVAS, (void**)(&pMe->piCanvas));
IDISPLAYCANVAS_SetDisplay((IDisplayCanvas*)(void *)pMe->piCanvas, pMe->piDisplay);
SETAEERECT(&(pMe->rcRoot), 0, 0,pMe->deviceInfo.cxScreen,pMe->deviceInfo.cyScreen);
IROOTCONTAINER_SetCanvas(pMe->picRoot, pMe->piCanvas, &(pMe->rcRoot));
if(result != 0)
DBGPRINTF("RESULT2 FAILED");
result = ISHELL_CreateInstance(pMe->piShell,AEECLSID_CONSTRAINTCONTAINER, (void**) &pMe->containerWidget);
result = ICONSTRAINTCONTAINER_QueryInterface(pMe->containerWidget, AEEIID_WIDGET, (void**)&pMe->pIConstraintContainerWidget );
if(result != 0)
DBGPRINTF("RESULT3 FAILED");
result= ISHELL_CreateInstance(pMe->piShell, AEECLSID_STATICWIDGET, (void**)&introTextWidget);
result= ISHELL_CreateInstance(pMe->piShell, AEECLSID_STATICWIDGET, (void**)&introTextWidget1);
result= ISHELL_CreateInstance(pMe->piShell, AEECLSID_VIEWPORTWIDGET, (void**)&vpWidget);
result= ISHELL_CreateInstance(pMe->piShell, AEECLSID_SCROLLBARWIDGET, (void**) &piScrollWidget);
if(result != 0)
DBGPRINTF("RESULT4 FAILED");
pMe->introStr = (AECHAR*)MALLOC(200);;
ISHELL_LoadResString(pMe->piShell,APPLICATION3_RES_FILE,szBuf,pMe->introStr,512 * (sizeof( AECHAR )+1));
we.height =10;
we.width = 10;
IWIDGET_SetExtent(vpWidget, &we);
IWIDGET_SetFGColor(introTextWidget,MAKE_RGB(181,20 7,243));
IWIDGET_SetText(introTextWidget,pMe->introStr,FALSE);
IWIDGET_SetFlags(introTextWidget, IDF_ALIGN_RIGHT | SWF_WRAPTEXT );
IWIDGET_SetRightPadding(introTextWidget,10);
IWIDGET_SetLeftPadding(introTextWidget,10);
IWIDGET_SetTopPadding(introTextWidget,5);
IWidget_SetBGColor(pMe->picRoot, MAKE_RGBA(224, 224, 224, 255));
ISHELL_LoadResString(pMe->piShell,APPLICATION3_RES_FILE,pMe->introStr,szBuf,1024 * (sizeof( AECHAR )+1));
we.height =30;
we.width =20;
IWIDGET_SetExtent(vpWidget, &we);
IWIDGET_SetFGColor(introTextWidget1,MAKE_RGB(82,13 7,213));
IWIDGET_SetText(introTextWidget1,pMe->introStr,FALSE);
IWIDGET_SetFlags(introTextWidget1, IDF_ALIGN_RIGHT | SWF_WRAPTEXT );
IWIDGET_SetRightPadding(introTextWidget1,10);
IWIDGET_SetLeftPadding(introTextWidget1,10);
IWIDGET_SetTopPadding(introTextWidget1,5);
we.height = 230;
IWIDGET_SetExtent(introTextWidget, &we);
//IWIDGET_SetProperty(piScrollWidget, PROP_SCROLLPAD, 0);
IWIDGET_SetProperty(piScrollWidget,PROP_SCROLLPAD ,0);
IWIDGET_SetProperty(piScrollWidget,PROP_SCROLLCOLO R ,MAKE_RGB(82,137,213));
IWIDGET_SetProperty(piScrollWidget,PROP_SCROLLFILL COLOR,MAKE_RGB(82,137,213));
IWIDGET_SetProperty(piScrollWidget,PROP_SCROLLHAND LECOLOR,MAKE_RGB(181,207,243));
IWIDGET_SetFlags(piScrollWidget, SCROLL_VERT );
//IDECORATOR_SetWidget((IDecorator*)vpWidget , introTextWidget);
IDecorator_SetWidget((IDecorator*)vpWidget , introTextWidget);
IDecorator_SetWidget((IDecorator*)vpWidget , introTextWidget1);
IDecorator_SetWidget((IDecorator*)piScrollWidget, vpWidget);
wpos.x =(pMe->deviceInfo.cxScreen - we.width)/2;
wpos.y = 5;
wpos.bVisible = TRUE;
(void)IROOTCONTAINER_Insert(pMe->picRoot,piScrollWidget, WIDGET_ZNORMAL,&wpos);
ICONSTRAINTCONTAINER_Insert(pMe->containerWidget , piScrollWidget, WIDGET_ZNORMAL, &wpos);
In KEY_EVT i am using this code:-
case AVK_UP:
(void)IWIDGET_MoveFocus(pMe->piwRoot, (IWidget *)WIDGET_FOCUS_PREV);
return (TRUE);
// Down arrow key was pressed:
case AVK_DOWN:
(void)IWIDGET_MoveFocus(pMe->piwRoot, (IWidget *)WIDGET_FOCUS_NEXT);
return (TRUE);
i had used this code can u plz tell me that where the problem is??

hi,i am new to brewMP.i am trying to get scrollbar in my simulator of BREWMP but anyhow it is not showing .please can anyone correct me or show me the right and proper code to do this:-
the code which i had implemented for scrollbar is:-
result =ISHELL_CreateInstance(pMe->piShell, AEECLSID_ROOTCONTAINER, (void *)(&pMe->picRoot));
IROOTCONTAINER_QueryInterface(pMe->picRoot, AEEIID_WIDGET, (void *)(&pMe->piwRoot));
if(result != 0)
DBGPRINTF("RESULT1 FAILED");
result = ISHELL_CreateInstance(pMe->piShell, AEECLSID_DISPLAYCANVAS, (void**)(&pMe->piCanvas));
IDISPLAYCANVAS_SetDisplay((IDisplayCanvas*)(void *)pMe->piCanvas, pMe->piDisplay);
SETAEERECT(&(pMe->rcRoot), 0, 0,pMe->deviceInfo.cxScreen,pMe->deviceInfo.cyScreen);
IROOTCONTAINER_SetCanvas(pMe->picRoot, pMe->piCanvas, &(pMe->rcRoot));
if(result != 0)
DBGPRINTF("RESULT2 FAILED");
result = ISHELL_CreateInstance(pMe->piShell,AEECLSID_CONSTRAINTCONTAINER, (void**) &pMe->containerWidget);
result = ICONSTRAINTCONTAINER_QueryInterface(pMe->containerWidget, AEEIID_WIDGET, (void**)&pMe->pIConstraintContainerWidget );
if(result != 0)
DBGPRINTF("RESULT3 FAILED");
result= ISHELL_CreateInstance(pMe->piShell, AEECLSID_STATICWIDGET, (void**)&introTextWidget);
result= ISHELL_CreateInstance(pMe->piShell, AEECLSID_STATICWIDGET, (void**)&introTextWidget1);
result= ISHELL_CreateInstance(pMe->piShell, AEECLSID_VIEWPORTWIDGET, (void**)&vpWidget);
result= ISHELL_CreateInstance(pMe->piShell, AEECLSID_SCROLLBARWIDGET, (void**) &piScrollWidget);
if(result != 0)
DBGPRINTF("RESULT4 FAILED");
pMe->introStr = (AECHAR*)MALLOC(200);;
ISHELL_LoadResString(pMe->piShell,APPLICATION3_RES_FILE,szBuf,pMe->introStr,512 * (sizeof( AECHAR )+1));
we.height =10;
we.width = 10;
IWIDGET_SetExtent(vpWidget, &we);
IWIDGET_SetFGColor(introTextWidget,MAKE_RGB(181,20 7,243));
IWIDGET_SetText(introTextWidget,pMe->introStr,FALSE);
IWIDGET_SetFlags(introTextWidget, IDF_ALIGN_RIGHT | SWF_WRAPTEXT );
IWIDGET_SetRightPadding(introTextWidget,10);
IWIDGET_SetLeftPadding(introTextWidget,10);
IWIDGET_SetTopPadding(introTextWidget,5);
IWidget_SetBGColor(pMe->picRoot, MAKE_RGBA(224, 224, 224, 255));
ISHELL_LoadResString(pMe->piShell,APPLICATION3_RES_FILE,pMe->introStr,szBuf,1024 * (sizeof( AECHAR )+1));
we.height =30;
we.width =20;
IWIDGET_SetExtent(vpWidget, &we);
IWIDGET_SetFGColor(introTextWidget1,MAKE_RGB(82,13 7,213));
IWIDGET_SetText(introTextWidget1,pMe->introStr,FALSE);
IWIDGET_SetFlags(introTextWidget1, IDF_ALIGN_RIGHT | SWF_WRAPTEXT );
IWIDGET_SetRightPadding(introTextWidget1,10);
IWIDGET_SetLeftPadding(introTextWidget1,10);
IWIDGET_SetTopPadding(introTextWidget1,5);
we.height = 230;
IWIDGET_SetExtent(introTextWidget, &we);
//IWIDGET_SetProperty(piScrollWidget, PROP_SCROLLPAD, 0);
IWIDGET_SetProperty(piScrollWidget,PROP_SCROLLPAD ,0);
IWIDGET_SetProperty(piScrollWidget,PROP_SCROLLCOLO R ,MAKE_RGB(82,137,213));
IWIDGET_SetProperty(piScrollWidget,PROP_SCROLLFILL COLOR,MAKE_RGB(82,137,213));
IWIDGET_SetProperty(piScrollWidget,PROP_SCROLLHAND LECOLOR,MAKE_RGB(181,207,243));
IWIDGET_SetFlags(piScrollWidget, SCROLL_VERT );
//IDECORATOR_SetWidget((IDecorator*)vpWidget , introTextWidget);
IDecorator_SetWidget((IDecorator*)vpWidget , introTextWidget);
IDecorator_SetWidget((IDecorator*)vpWidget , introTextWidget1);
IDecorator_SetWidget((IDecorator*)piScrollWidget, vpWidget);
wpos.x =(pMe->deviceInfo.cxScreen - we.width)/2;
wpos.y = 5;
wpos.bVisible = TRUE;
(void)IROOTCONTAINER_Insert(pMe->picRoot,piScrollWidget, WIDGET_ZNORMAL,&wpos);
ICONSTRAINTCONTAINER_Insert(pMe->containerWidget , piScrollWidget, WIDGET_ZNORMAL, &wpos);
In KEY_EVT i am using this code:-
case AVK_UP:
(void)IWIDGET_MoveFocus(pMe->piwRoot, (IWidget *)WIDGET_FOCUS_PREV);
return (TRUE);
// Down arrow key was pressed:
case AVK_DOWN:
(void)IWIDGET_MoveFocus(pMe->piwRoot, (IWidget *)WIDGET_FOCUS_NEXT);
return (TRUE);
i had used this code can u plz tell me that where the problem is??