Hello all!,
I'm having some trouble creating my first Reaction-based application, it is
just by using the WA_BackFill tag which I want to use to draw some border,
background, and logo on my own.
While I use WA_BackFill, objects disappear after the window gets opened, like
if the background gets drawed above them... but this does not happend with
all objects, just from the second Child and beyond, and if I remove the first
Child to check if it is causing something, the same appears with the others!
There is the example Im working with:
--- backfill hook:
{
SetAPen( rp, 3 );
RectFill( rp, 1, 1, WIDTH-1, HEIGHT-1 );
....
}
--- window creation:
{
.....
window_obj = NewObject( WINDOW_GetClass(), NULL,
WA_Width, WIDTH,
WA_Height, HEIGHT,
WA_BackFill, (ULONG) &BackFillHook,
WINDOW_Layout,(ULONG)NewObject(LAYOUT_GetClass(),NULL,
GA_DrawInfo, (ULONG) drinfo,
//LAYOUT_DeferLayout, TRUE,
LAYOUT_Orientation, LAYOUT_ORIENT_VERT,
LAYOUT_AddChild, (ULONG)NewObject(LAYOUT_GetClass(),NULL,
LAYOUT_BevelStyle, BVS_GROUP,
LAYOUT_AddImage,(ULONG)NewObject(LABEL_GetClass(),NULL,
LABEL_DrawInfo, (ULONG) drinfo,
LABEL_Text, (ULONG) "Reaction is funny... =]",
TAG_DONE),
TAG_DONE),
LAYOUT_AddChild, (ULONG)NewObject(LAYOUT_GetClass(),NULL,
GA_DrawInfo, (ULONG) drinfo,
LAYOUT_Orientation, LAYOUT_ORIENT_VERT,
//LAYOUT_VertAlignment, LAYOUT_ALIGN_CENTER,
//LAYOUT_BevelStyle, BVS_GROUP,
LAYOUT_EvenSize, TRUE,
LAYOUT_BevelStyle, BVS_SBAR_VERT,
LAYOUT_AddChild, (ULONG)NewObject(CHECKBOX_GetClass(),NULL,
GA_DrawInfo, (ULONG) drinfo,
GA_Text, (ULONG)"checkbox gadget 1",
GA_RelVerify, TRUE,
TAG_DONE),
LAYOUT_AddChild, (ULONG)NewObject(CHECKBOX_GetClass(),NULL,
GA_DrawInfo, (ULONG) drinfo,
GA_Text, (ULONG)"checkbox gadget 2",
GA_RelVerify, TRUE,
TAG_DONE),
TAG_DONE),
LAYOUT_AddChild, (ULONG)NewObject(LAYOUT_GetClass(),NULL,
LAYOUT_BevelStyle, BVS_GROUP,
LAYOUT_HorizAlignment, LAYOUT_ALIGN_CENTER,
LAYOUT_AddChild,(ULONG)NewObject(NULL,"button.gadget",
GA_Text, (ULONG)"_A",
GA_RelVerify, TRUE,
TAG_DONE),
LAYOUT_AddChild,(ULONG)NewObject(NULL,"button.gadget",
GA_Text, (ULONG)"_B",
GA_RelVerify, TRUE,
TAG_DONE),
LAYOUT_AddChild,(ULONG)NewObject(NULL,"button.gadget",
GA_Text, (ULONG)"_C",
GA_RelVerify, TRUE,
TAG_DONE),
TAG_DONE),
LAYOUT_AddChild, (ULONG)NewObject(LAYOUT_GetClass(),NULL,
LAYOUT_BevelStyle, BVS_GROUP,
LAYOUT_AddImage,(ULONG)NewObject(GLYPH_GetClass(),NULL,
GLYPH_Glyph, GLYPH_UPARROW,
TAG_DONE),
TAG_DONE),
TAG_DONE),
TAG_DONE);
.....
}
Please help me, what im doing wrong?
btw, it is the first time as well im using a BackFill hook, but I assume
there shouldn't be any problem with it as it seems too simple, or may im
missing some drawing modes or something from here...(I've tryed some with
same results, though)...?
Thanks a lot for your time and any help.
Gretz.