On 26 Oct 2004, at 04:02, bernie wrote: > Got a problem when using CLS in windows created using FB's appearance > window statement. > > If a theme background window contains a data browser and I do a CLS, > everything's fine but once I've selected an item in the browser and > then do a CLS, the window is wiped to white. > > A window created with fn CreateNewWindow() works OK but I want a > window with a good old fashioned FB wndNum. > > I thought I'd try writing a MakeIntoFBWindow() function (similar to > Robert P's MakeIntoFBButton) but that's a bit beyond me. cls is an old FB command for clearing text and graphics. It is essentially: EraseRect( portBounds ) In FBII and in the Standard BASIC runtimes of FB^3 and FB4, controls are protected from being erased. In the Appearance runtime the complicated clip-region patches to protect controls were discontinued, except for scrollbars. Instead, cls erases everything and then redraws the controls. Presumably the redraw does not work properly if you have an item selected in your DataBrowser. In general I would recommend not using cls in a window that contains elaborate controls, but find some other way to remove unwanted text/graphics. Robert P.