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

Developer

Forums

Is there any way to get rid of the title widget for a given form so that there is more room for the other widgets? It seems to imply in the documentation that it can be done, but I can't find how to do it. I've tried setting the title widget to null and various other things, but it won't go away.

-Al

One way to acheive this is to add a handler to the form for EVT_WDG_GETPROPERTY on FID_PREFRECT. Set the preferred rectangle to start at the top of the screen and the title won't appear. Here's an example.
static boolean EventCb(void *arg, AEEEvent evt, uint16 wParam, uint32 dwParam)
{
if (evt == EVT_WDG_GETPROPERTY && wParam == FID_PREFRECT) {
AEERect *rect = (AEERect *)dwParam;
IROOTFORM_GetClientRect(rootForm, NULL, rect);
// Extend the rectangle so that it starts at y == 0.
rect->dy = rect->y + rect->dy;
rect->y = 0;
return TRUE;
}
...

One way to acheive this is to add a handler to the form for EVT_WDG_GETPROPERTY on FID_PREFRECT. Set the preferred rectangle to start at the top of the screen and the title won't appear. Here's an example.
static boolean EventCb(void *arg, AEEEvent evt, uint16 wParam, uint32 dwParam)
{
if (evt == EVT_WDG_GETPROPERTY && wParam == FID_PREFRECT) {
AEERect *rect = (AEERect *)dwParam;
IROOTFORM_GetClientRect(rootForm, NULL, rect);
// Extend the rectangle so that it starts at y == 0.
rect->dy = rect->y + rect->dy;
rect->y = 0;
return TRUE;
}
...

noah wrote:One way to acheive this is to add a handler to the form for EVT_WDG_GETPROPERTY on FID_PREFRECT. Set the preferred rectangle to start at the top of the screen and the title won't appear. Here's an example.
static boolean EventCb(void *arg, AEEEvent evt, uint16 wParam, uint32 dwParam)
{
if (evt == EVT_WDG_GETPROPERTY && wParam == FID_PREFRECT) {
AEERect *rect = (AEERect *)dwParam;
IROOTFORM_GetClientRect(rootForm, NULL, rect);
// Extend the rectangle so that it starts at y == 0.
rect->dy = rect->y + rect->dy;
rect->y = 0;
return TRUE;
}
...

Cool, that worked. It's a bit of a pain to have to set up all that event handling stuff to do something to simple, but it's pretty much par for the course in BREW :).

noah wrote:One way to acheive this is to add a handler to the form for EVT_WDG_GETPROPERTY on FID_PREFRECT. Set the preferred rectangle to start at the top of the screen and the title won't appear. Here's an example.
static boolean EventCb(void *arg, AEEEvent evt, uint16 wParam, uint32 dwParam)
{
if (evt == EVT_WDG_GETPROPERTY && wParam == FID_PREFRECT) {
AEERect *rect = (AEERect *)dwParam;
IROOTFORM_GetClientRect(rootForm, NULL, rect);
// Extend the rectangle so that it starts at y == 0.
rect->dy = rect->y + rect->dy;
rect->y = 0;
return TRUE;
}
...

Cool, that worked. It's a bit of a pain to have to set up all that event handling stuff to do something to simple, but it's pretty much par for the course in BREW :).