Desktop application オブジェクト - CreateColorDialog メソッド

カラーピッカーのインスタンスを作成

Desktopapplicationオブジェクト (PRIM_APPL) のメンバ

パラメータ

名前

タイプ

データタイプ

記述

Result

*Result (任意)

PRIM_APPL.ICommonDialogColor

新規作成のダイアログへの参照

詳細

CreateColorDialog メソッドは、Windows カラーダイアログのインスタンスを作成するために使用されます。

カラーダイアログを使用して背景色を設定します。 

     Function Options(*DIRECT)
Begin_Com Role(*EXTENDS #PRIM_FORM ) Clientwidth(551) Clientheight(301) Left(165) Top(204) Width(567) Style(#Style1)

Define_Com Class(#PRIM_VS.Style) Name(#Style1) Backgroundbrush(#Brush1)
Define_Com Class(#PRIM_VS.SolidBrush) Name(#Brush1) Color(255:255:255)

Define_Com Class(#PRIM_PHBN) Name(#Pick) Caption('Pick a Color') Displayposition(1) Left(16) Parent(#COM_OWNER) Tabposition(1) Top(16) Width(129)

Evtroutine Handling(#Pick.Click)

#Com_owner.PickColor

Endroutine

Mthroutine Name(PickColor)

Define_Com Class(#Prim_appl.ICommonDialogColor) Name(#ColorDialog) Reference(*Dynamic)

#ColorDialog <= #sys_appln.CreateColorDialog

If (#ColorDialog.Show)

#Brush1.Color := #ColorDialog.ChosenColor

Endif

Endroutine

End_Com


参照

すべてのコンポーネント クラス
テクニカルリファレンス

  • No labels