--- In [email protected], "majesticartz" <majestica...@...> wrote: > --- In [email protected], "majesticartz" <majestica...@...> wrote: > > Is it possible to change the window background color of a window > using the dialog plugin. Sheri wrote a script [...which changed > fonts in pproconf] and I'm wondering if it can change window > color properties as well.
[..snip..] That turned out not to be a good script as later discussions revealed. When you use dialog.set_font it makes a font resource. The way the script you quoted worked, it made another font every time, even though the font characteristics were unchanged. Dialog only succeeds in actually changing the target font to the newly created font for windows running within the powerpro process. Pproconf runs in its own process. So the dialog plugin was making a font (in the powerpro process space) for each of pproconf's grid windows. Dialog tried to apply the font to a windows not in powerpro's space. That caused Windows to apply the system font instead of the font requested. As a bonus, font resources piled up in the powerpro process space that never got destroyed. Graphic resources within a give process are limited. If you exceed the limit, Powerpro quits being able to paint its bars, menus, etc. The bottom line on this was that Bruce implemented a way to select a custom font for the grid windows in Pproconf. I changed my scripts that used the dialog plugin for changing non-dialog Powerpro windows (Powerpro Debug and Powerpro Script Debug) so that they reuse the fonts I've already created. And I deleted my scripts that tried to change fonts on windows outside the Powerpro process. After that, some pretty big resource leaks outside the control of the user were found and plugged in the dialog plugin 1.19, and a font leak was plugged in Powerpro itself. I haven't tried using the dialog plugin to change colors of non-dialog windows inside or outside the Powerpro process. But I would caution that like fonts, color fills are graphic resources, and any that you create need to be destroyed. In dialog version 1.19 a service was added that that allows you to destroy a font you create after the window using the font has been closed, but I don't know about a color fill. Regards, Sheri
