Page History
[ |../../index.htm#lansa/vlfonetutorials_0565.htm]
...
You need to edit the background panel to make it respond to the custom Framework manager.
Open the background panel (XXX_BackgoundPane) in the Visual LANSA editor.
Display the Source tab and define your custom Framework manager (replace #EOM_CustomManager with the name of your custom Framework manager):
| Code Block |
|---|
Define_Com Class(#EOM_CustomManager) Name(#CustomFrameworkManager) Reference(*DYNAMIC) |
...
In the uInitialize event, set a reference to your custom Framework manager (replace #EOM_CustomManager with the name of your custom Framework manager):
| Code Block |
|---|
#CustomFrameworkManager <= #AVFRAMEWORKMANAGER.avCustomManagerBaseReference *As #EOM_CustomManager |
...
Then add two event routines to change the style and image on the background panel:
| Code Block |
|---|
*----------------------------------------------------------------------------------- |
...
Evtroutine Handling(#CustomFrameworkManager.ChangeBackgroundTextStyle) Tostyle(#ToStyle) |
...
...
#CurrentContent.Style <= #ToStyle |
...
...
#CurrentContent.Height := #ToStyle.FontSize + 2 |
...
...
Endroutine |
...
...
*----------------------------------------------------------------------------------- |
...
Evtroutine Handling(#CustomFrameworkManager.ChangeBackgroundImage) Imagename(#ImageName) |
...
...
#Image.Image <= #SYS_APPLN.CreateBitmap( ("VLFONE/Images/Black/XLarge/" + #ImageName) ) |
...
...
Endroutine |
...
...
*----------------------------------------------------------------------------------- |
...
Lastly, if your background panel has a uTerminate method already, add these lines to it:
| Code Block |
|---|
*Drop any reference to the custom framework manager |
...
#CustomFrameworkManager <= *null |
...
Otherwise, add a uTerminate method like this:
| Code Block |
|---|
Mthroutine Name(uTerminate) Options(*REDEFINE) |
...
* Drop any reference to the custom framework manager #CustomFrameworkManager <= *null * Delegate to the ancestor component in case it wants to clean up anything #COM_ANCESTOR.uTerminate |
...
...
Endroutine |
...
Compile the background panel.
...