[ |../../index.htm#lansa/vlfonetutorials_0565.htm]
Visual LANSA フレームワーク ガイド > チュートリアル > VLF-ONE Web アプリケーションのチュートリアル > 理解しておくと便利な事柄 > 設定パネルの作成 > 背景パネルの編集l
背景パネルの編集l
次は背景パネルを編集して、カスタム・フレームワーク・マネージャに応答するようにしなければいけません。
Visual LANSA エディターで、背景パネル (XXX_BackgoundPane) を開きます。
[ソース]タブを表示し、次のように自身のカスタム・フレームワーク・マネージャを定義します (#CCC_CustomManager を自身のカスタム・フレームワーク・マネージャ名に置換します)。
Define_Com Class(#CCC_CustomManager) Name(#CustomFrameworkManager) Reference(*DYNAMIC)
uInitialize イベント内で、自身のカスタム・フレームワーク・マネージャへの参照を次のように設定します (#CCC_CustomManager を自身のカスタム・フレームワーク・マネージャ名に置換)。
#CustomFrameworkManager <= #AVFRAMEWORKMANAGER.avCustomManagerBaseReference *As #CCC_CustomManager
次に、以下の背景パネルのスタイルとイメージを変更する 2 つのイベント・ルーチンを追加します。
- -----------------------------------------------------------------------------------
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
- -----------------------------------------------------------------------------------
最後に、背景パネルにすでに uTerminate メソッドがある場合は、以下の行を追加します。 - Drop any reference to the custom framework manager
#CustomFrameworkManager <= *null
uTerminate メソッドが無い場合、以下を追加します。
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
背景パネルをコンパイルします。
[ |../../index.htm#lansa/vlfonetutorials_0565.htm]