I have a layout designed and working just fine. But let's say I don't want to create one of the gadgets, by user choice, in the layout. How do I "skip over it"?
I have been doing this:
- !Prefs->StatusBar ? TAG_IGNORE : StartHGroup,
- LAYOUT_BevelStyle, BVS_SBAR_VERT,
- LAYOUT_SpaceOuter, TRUE,
- LAYOUT_FixedVert, FALSE,
- LAYOUT_InnerSpacing, 0,
- LAYOUT_LeftSpacing, 0,
- LAYOUT_RightSpacing, 0,
- LAYOUT_TopSpacing, 0,
- LAYOUT_BottomSpacing, 0,
- LAYOUT_AddChild, Objects[GAD_STATUSBAR]=NewObject(ButtonClass,NULL,
- GA_ID, GAD_STATUSBAR,
- GA_ReadOnly, TRUE,
- GA_Underscore, "^",
- GA_Text, "",
- BUTTON_BevelStyle, BVS_NONE,
- BUTTON_Justification, BCJ_LEFT,
This works fine. But for some reason when I do display the gadget all the memory is freed. When I don't display the gadget I lose 3,800 bytes.
Is there a better way to "skip over" a gadget when creating the layout?