Have a Question?
Print

00853: Setting background color in a main or child window

Title:

Setting background color in a main or child window

Description:

The following code illustrates the use of the backcolor and clearbg mnemonics, and the clear mnemonic, in setting background colors in windows and child windows. The documentation on ‘backcolor’ implies that this should work. 

begin 

rem test colors in a child window 

        sysgui=unt 
        open(sysgui)”X0″ 

        x=100 
        y=100 
        w=824 
        h=568 
        title$=”Test Window” 
        flags$=$82$ 
        eventmask$=$ff$ 

        true=1 
        false=0 
        done=false 

        print (sysgui)’WINDOW'(x,y,w,h,title$,flags$) 
        print (sysgui)’child'(101,x+10,y+10,w-200,h-200,$$,$$,1) 

        print (sysgui)’context'(0) 
        print (sysgui)’backcolor'(1),’clearbg’ 

        print (sysgui)’context'(1) 
        print (sysgui)’clear'(128,128,128) 

        dim event$:tmpl(sysgui) 
        event=len(event$) 

repeat 

        readrecord(sysgui,siz=event)event$ 
        if event.code$=”X” then done=true 

until done 

release 



Last Modified: 11/28/2000 Product: Visual PRO/5 Operating System: Windows

BASIS structures five components of their technology into the BBx Generations.

Table of Contents
Scroll to Top