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

ビットマップインスタンス(Prim_bmp)を作成

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

パラメータ

名前

タイプ

データタイプ

記述

Result

*Result (任意)

PRIM_BMP

新規ビットマップインスタンスへの参照

FileName

*Input (任意)

文字列

使用するファイル

Exists

*Output (任意)

ブール値

指定のパスが有効な場合にTRUEを返します。

詳細

CreateBitmapメソッドは、Bitmap のインスタンスを作成するために使用されます。.

ブラウザで実行する場合、ビットマップの実際のロードは非同期です。ロードされた イベントは、これが完了したことを判断するために使用することができます。

ビットマップ・インスタンスの作成とロードは、通常、表示するファイルを選択するときに使用されます。

この例では、ファイルはファイルピッカーを介してロードされます。結果のファイルは BLOB フィールド xDemoBlob に格納され、 Bitmap インスタンスはImage コントロールで使用されます。

     Begin_Com Role(*EXTENDS #PRIM_WEB) Layoutmanager(#TableLayout1) Theme(#SYS_THEME<2015DeepOrange>) 

Define_Com Class(#PRIM_TBLO) Name(#TableLayout1)
Define_Com Class(#PRIM_TBLO.Column) Name(#Column1) Displayposition(1) Parent(#TableLayout1) Width(185) Units(Pixels)
Define_Com Class(#PRIM_TBLO.Column) Name(#Column2) Displayposition(2) Parent(#TableLayout1) Width(1.7)
Define_Com Class(#PRIM_TBLO.Row) Name(#Row1) Displayposition(1) Parent(#TableLayout1)
Define_Com Class(#PRIM_TBLO.Item) Name(#FilePicker1Item1) Alignment(TopCenter) Column(#Column1) Manage(#FilePicker) Parent(#TableLayout1) Row(#Row1) Sizing(None) Margintop(6)
Define_Com Class(#PRIM_TBLO.Item) Name(#Image1Item1) Column(#Column2) Manage(#Image) Parent(#TableLayout1) Row(#Row1) Margintop(6) Marginright(6) Marginbottom(6) Marginleft(6)
Define_Com Class(#PRIM_TBLO.Item) Name(#Label1Item1) Alignment(BottomCenter) Column(#Column2) Manage(#Filename) Parent(#TableLayout1) Row(#Row1) Sizing(FitToWidth) Marginbottom(12) Marginright(12) Marginleft(12)

Define_Com Class(#PRIM_WEB.FilePicker) Name(#FilePicker) Displayposition(2) Ellipses(Word) Height(56) Left(8) Parent(#COM_OWNER) Tabposition(1) Tabstop(False) Top(6) Verticalalignment(Center) Width(169) Image(#xImageCamera32) Caption('Select an Image') Marginleft(8) Themedrawstyle('PushButton')
Define_Com Class(#PRIM_IMAG) Name(#Image) Displayposition(3) Left(191) Parent(#COM_OWNER) Tabposition(2) Tabstop(False) Top(6) Height(788) Width(1003)
Define_Com Class(#PRIM_LABL) Name(#Filename) Displayposition(1) Ellipses(Word) Height(55) Left(197) Parent(#COM_OWNER) Tabposition(3) Tabstop(False) Top(733) Verticalalignment(Center) Width(991) Alignment(Center) Themedrawstyle('Heading1')

Evtroutine Handling(#FilePicker.FileSelected) File(#File)

#Image.Image <= #sys_appln.Createbitmap( #File.blob )
#Filename #xDemoblob := #File.blob

Endroutine

End_Com


参照

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