Edit the Settings Panel

You need to add buttons to the settings panel and make the button Click events request the Framework manager to change the settings of the background panel.

Open the settings panel (XXX_SettingsPane) and replace the source code with this code:

* -----------------------------------------------------------------------------------------------

* This is the custom settings pane for framework CCC Framework

* -----------------------------------------------------------------------------------------------

Begin_Com Role(*EXTENDS #VF_AC030O) Width(327)

 

 

* -----------------------------------------------------------------------------------------------

Define_Com Class(#Prim_phbn) Name(#BlueTextButton) Parent(#COM_OWNER) Caption('Change Background to Big Blue Text') Displayposition(6) Tabposition(6) Width(290)

Define_Com Class(#Prim_phbn) Name(#RedTextButton) Parent(#COM_OWNER) Caption('Change Background to Medium Red Text') Displayposition(5) Tabposition(5) Width(290) Top(40)

Define_Com Class(#Prim_phbn) Name(#GreenTextButton) Parent(#COM_OWNER) Caption('Change Background to Small Green Text') Displayposition(4) Tabposition(4) Width(290) Top(72)

 

* -----------------------------------------------------------------------------------------------

Define_Com Class(#Prim_phbn) Name(#Image1Button) Parent(#COM_OWNER) Caption('Change Background Image to Android Robot') Displayposition(3) Tabposition(3) Width(290) Top(152) Componenttag('ANDROID_GOOGLE.PNG')

Define_Com Class(#Prim_phbn) Name(#Image2Button) Parent(#COM_OWNER) Caption('Change Background Image to Happy Face') Displayposition(2) Tabposition(2) Width(290) Top(182) Componenttag('emoticon_happy.png')

Define_Com Class(#Prim_phbn) Name(#Image3Button) Parent(#COM_OWNER) Caption('Change Background Image to Scissors') Displayposition(1) Tabposition(1) Width(290) Top(212) Componenttag('cut_outline.png')

 

 

* -----------------------------------------------------------------------------------------------

Define_Com Class(#Prim_vs.SolidBrush) Name(#TransparentBrush) Color(Transparent)

Define_Com Class(#Prim_vs.Style) Name(#LargeBlueFont) Fontsize(64) Fontunits(Pixel) Backgroundbrush(#TransparentBrush) Textcolor(Blue)

Define_Com Class(#Prim_vs.Style) Name(#MediumRedFont) Fontsize(32) Fontunits(Pixel) Backgroundbrush(#TransparentBrush) Textcolor(Red)

Define_Com Class(#Prim_vs.Style) Name(#SmallGreenFont) Fontsize(11) Fontunits(Pixel) Backgroundbrush(#TransparentBrush) Textcolor(Green)

 

* -----------------------------------------------------------------------------------------------

Evtroutine Handling(#BlueTextButton.Click)

 

Define_Com Class(#CCC_CustomManager) Name(#CustomFrameworkManager) Reference(*DYNAMIC)

#CustomFrameworkManager <= #AVFRAMEWORKMANAGER.avCustomManagerBaseReference *As #CCC_CustomManager

#CustomFrameworkManager.RequestlChangeBackgroundTextStyle Tostyle(#LargeBlueFont)

Endroutine

 

* -----------------------------------------------------------------------------------------------

Evtroutine Handling(#RedTextButton.Click)

Define_Com Class(#CCC_CustomManager) Name(#CustomFrameworkManager) Reference(*DYNAMIC)

#CustomFrameworkManager <= #AVFRAMEWORKMANAGER.avCustomManagerBaseReference *As #CCC_CustomManager

#CustomFrameworkManager.RequestlChangeBackgroundTextStyle Tostyle(#MediumRedFont)

Endroutine

 

* -----------------------------------------------------------------------------------------------

Evtroutine Handling(#GreenTextButton.Click)

Define_Com Class(#CCC_CustomManager) Name(#CustomFrameworkManager) Reference(*DYNAMIC)

#CustomFrameworkManager <= #AVFRAMEWORKMANAGER.avCustomManagerBaseReference *As #CCC_CustomManager

#CustomFrameworkManager.RequestlChangeBackgroundTextStyle Tostyle(#SmallGreenFont)

Endroutine

 

* -----------------------------------------------------------------------------------------------

Evtroutine Handling(#Image1Button.Click #Image2Button.Click #Image3Button.Click) Com_Sender(#SenderImageButton)

Define_Com Class(#CCC_CustomManager) Name(#CustomFrameworkManager) Reference(*DYNAMIC)

 

#CustomFrameworkManager <= #AVFRAMEWORKMANAGER.avCustomManagerBaseReference *As #CCC_CustomManager

#CustomFrameworkManager.RequestChangeBackgroundImage Imagename(#SenderImageButton.ComponentTag)

Endroutine

 

End_Com

 

In the code, replace the references to #CCC_CustomManager with the name of your own custom manager.

Display the Design tab. Your settings panel now has buttons to change the background panel text and image:

 

The Click event routines of the buttons set a reference to the custom Framework manager and send it requests to change the background text or image. For example:

 

Complile and close the settings panel.